https://gyazo.com/c868fe5722917c1c6cef3c335da43b50 https://gyazo.com/9cad2185947b4ce68d07aef6ba8f66f1 http://prntscr.com/mmuopt https://gyazo.com/03419319048d4ecb74d4d7a82b8eb3f5
When walking up to the stage1 brick it does nothing. It doesn't show the gui and make it visible please help. There is an error on line 5. Please Help.
script.Parent.Touched:Connect(function()
local player = game.Players.LocalPlayer
if player.leaderstats.Stage.Value <= 0 then
player.PlayerGui.stage.stage1.Visible = true
elseif player.leaderstats.Stage.Value >= 0 then
game.Workspace.stage1door:Destroy()
end
end)

13 comments
is script a localscript?
^
no
Then that's the problem. It must be a localscript, if you want to detect the leaderstats.Stage, except if you use RemoteEvents.
Can u use a localscript instead of an remoteevent
Yes you can. But that would cause some issues (example a script tried to call the GUI but its local).
https://gyazo.com/28d8d7b50d0681ca351286a6e253303d
You can only call :FireServer() from a localscript.
its not working still
Your trying to get a localplayer from a script. Use :GetPlayerFromCharacter() and it should work.
k let me try
https://cdn.discordapp.com/attachments/546872841417523231/547157566749147137/unknown.png
https://gyazo.com/16acc862dbb9fc18035649a47c7c07ad, https://gyazo.com/c88ad6ec12b530206131651d77a953d8