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

Cant see any of my Roblox guis? Though it says it's enabled?

Whenever I play any of my Roblox games I can never see guis that eppear from clicking gui buttons, or clicking parts, or even enabling it on the properties tab. But this is only whenever I'm playing the game, when I am in studio mode I can easily see the gui each time I enable or disable it. Though if I enable it then join the game I can see it, but then if I disable it and enable it again I cant. Whenever I press the button or brick to enable the gui while it doesn't appear if I look in properties it says its enabled? Whats the deal with this? This is the script I used.

local function onMouseClick(player)


game.StarterGui.Trash.Frame.Visible=true


end
script.Parent.ClickDetector.MouseClick:connect(onMouseClick)

I receive no errors.

1 comment

0

You shouldn't receive any errors since the script's function will work.

1 answer

✓ Accepted answer

The GUI from StarterGui loads into the LocalPlayer's PlayerGui when a player is added thus changes made in StarteGui after the player joins/respawns do not effect the PlayerGui.

You would use LocalPlayer in a localscript

function onMouseClick()
game.Players.LocalPlayer.PlayerGui.Trash.Frame.Visible=true
end

script.Parent.ClickDetector.MouseClick:Connect(onMouseClick)

1 comment

0

Thanks Alot! =D

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