Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I keep getting a stack error on line 4 of my script, same error over and over?

game.ReplicatedStorage:WaitForChild("Lock").OnServerEvent:connect(function(x)
	print("Ok, spectator ranking has received the alert. I am now locking the server")
	workspace["Auto Team Rank"].Value.Value = true
	game.Players[x.Name].PlayerGui:WaitForChild("HostGUI").LockButton.State.Value = true
	game.Players.LocalPlayer.PlayerGui.HostGUI.Button.Text = "LOCKED"	
end)

I've tried everything to solve the problem but I keep getting the same error.

edit; yes the game has fe on

3 comments

0

What is the error? Is FE on? I will warn you that if you don't check if the player is allowed to lock a hacker can trigger your event and lock the server.

0

Yes, FE is on. There aren't any errors but I am getting a "Stack Begin" then mentions of line 4 of the script, then a "Stack End".

0

Is game FE?

1 answer

FE prevents the server from seeing the PlayerGui

To fix it use a RemoteEvent to tell the client to set the value.

2 comments

0

damn

0

no :/

This discussion is preserved as it was. New answers, comments, and votes are closed.