Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LuauInLuau:1542: attempt to call a nil value #3

Open
Seamorethemaster opened this issue Apr 29, 2024 · 2 comments
Open

LuauInLuau:1542: attempt to call a nil value #3

Seamorethemaster opened this issue Apr 29, 2024 · 2 comments

Comments

@Seamorethemaster
Copy link

I keep on getting this error well im trying to use this for a simple script, i dont know why this is erroring and how i can fix this, this is the code.

local RS = game:GetService("RunService")
	local Sound = Instance.new("Sound",game:GetService("SoundService"))
	Sound.SoundId = "rbxassetid://9040207316"
	local Com = Instance.new("CompressorSoundEffect",Sound)
	local Ech = Instance.new("EchoSoundEffect",Sound)
	local Tre = Instance.new("TremoloSoundEffect",Sound)

	local ScreenGui = Instance.new("ScreenGui")
	local ImageLabel = Instance.new("ImageLabel")

	ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
	ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
	ScreenGui.IgnoreGuiInset = true
	ScreenGui.ResetOnSpawn = false
	ScreenGui.DisplayOrder = 2147483647.999999

	ImageLabel.Parent = ScreenGui
	ImageLabel.AnchorPoint = Vector2.new(0.5, 0.5)
	ImageLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
	ImageLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
	ImageLabel.BorderSizePixel = 0
	ImageLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
	ImageLabel.Size = UDim2.new(1, 0, 1, 0)
	ImageLabel.Image = "rbxassetid://16870898800"
	ImageLabel.ZIndex = 2147483647.999999

	Sound.Playing = true
	Sound.Looped = true
	Sound.PlaybackSpeed = 0.5
	Sound.Volume = 2
	Com.Attack = 0.001
	Com.GainMakeup = 14.1
	Com.Ratio = 1
	Com.Release = 0.001
	Com.Threshold = 0
	Ech.Delay = 5
	Ech.DryLevel = 10
	Ech.Feedback = 1
	Ech.WetLevel = 10
	Tre.Depth = 1
	Tre.Duty = 0.5
	Tre.Frequency = 7.5
	Sound:Play()

	RS.Stepped:Connect(function()
		ScreenGui.DisplayOrder = 2147483647.999999
		ImageLabel.ZIndex = 2147483647.999999
	end)

I used this on a localscript, If you could tell me why its error that would be really helpful

@kosuke14
Copy link
Owner

Errors in LuauInLuau may be compile errors.
Check your code.

@Seamorethemaster
Copy link
Author

Errors in LuauInLuau may be compile errors. Check your code.

Thats the thing, I have
It works in vLua and in normal localscripts, But not in vLuau
This is the full error I am getting if you need it

  16:16:09.220  Workspace.MainModule.LuauInLuau:1542: attempt to call a nil value  -  Client - LuauInLuau:1542
  16:16:09.220  Stack Begin  -  Studio
  16:16:09.220  Script 'Workspace.MainModule.LuauInLuau', Line 1542  -  Studio - LuauInLuau:1542
  16:16:09.220  Script 'Workspace.MainModule.LuauInLuau', Line 1465 (x2)  -  Studio - LuauInLuau:1465
  16:16:09.220  Script 'Workspace.MainModule.LuauInLuau', Line 1636 - function LuauCompile  -  Studio - LuauInLuau:1636
  16:16:09.220  Script 'Workspace.MainModule', Line 55 - function luau_compile  -  Studio - MainModule:55
  16:16:09.220  Script 'Workspace.MainModule', Line 71 - function luau_execute  -  Studio - MainModule:71
  16:16:09.220  Script 'Workspace.MainModule', Line 75 - function __call  -  Studio - MainModule:75
  16:16:09.220  Script 'Players.zacharygineris102.PlayerGui.LocalScript', Line 6  -  Studio - LocalScript:6
  16:16:09.220  Stack End  -  Studio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants