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

why doesnt my local script doesnt work in the game?? (open/close gui)

The question says it all, I created a successful script thanks to a few people who helped me previously, and they work in test mode. But not in the actual game


local Text = game.Players.LocalPlayer.PlayerGui.ScreenGui.TextLabel
script.Parent.MouseButton1Click:connect (function()

    if Text.Visible == false then Text.Visible = true else
	Text.Visible = false
end

end)

2 comments

0

Consider changing line 1. use startergui instead. don't use playergui. That worked for me

0

startergui is not a child of a player

1 answer

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