I am making a message that will only appear to the person who clicked the button but it won't work could someone help me fix it? Heres the code:
script.Parent.ClickDetector.mouseClick:connect(onClicked)
function onClicked()
local message = Instance.new('Message', game.Players.LocalPlayer.PlayerGui) -- Insert a new message in the Workspace.
message.Text = "Admins Only in this room" -- Set the text of the message
wait(5)
message:Destroy() -- Remove the message after 5 seconds.
end

1 comment
Thanks