script.Parent.ClickDetector.MouseClick:connect(function(playerWhoClicked)
local userplayer = playerWhoClicked.name
game.Players.userplayer.PlayerGui.NoteGui.Enabled = true
end)
How do I fix that.
script.Parent.ClickDetector.MouseClick:connect(function(playerWhoClicked)
local userplayer = playerWhoClicked.name
game.Players.userplayer.PlayerGui.NoteGui.Enabled = true
end)
How do I fix that.
script.Parent.ClickDetector.MouseClick:connect(function(player)
player.PlayerGui.NoteGui.Enabled = true
end)
Works! Thank you very much.
Was gonna say that, dang it! Good job anyways.
Too broad. Second of all, line 3 should be
game.Players[username].PlayerGui.NoteGui.Enabled = true
can't it just be (game.Players.LocalPlayer OR playerWhoClicked.PlayerGui.Enabled = true) ?
But I won't know who clicked it.
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
This script won't work.
What's the error? Try elaborating more on what fixing is needed.
I want to open the gui when the player clicks the click detector but when I go into a public game it won't work.