Hello, there I have been making a game for [USA] The United States of America and am working on making a PTS System for a tryout place anyways please feel free to look at my code and explain what is wrong I also have an f9 photo.
function onClick(mouse)
game.Players.LocalPlayer.PlayerGui.Message.MessageBar.Message.Text="Permission to Speak is in effect"
game.Players.LocalPlayer.PlayerGui.Chat.Chats.Message.Text="[Server] PTS is in effect do not speak."
end
script.Parent.MouseButton1Click:connect(onClick)
Here is the error photo from the f9 developer console.
https://gyazo.com/97d462d467e53629a253c0a2c1083de0
Please try and explain it good so I can understand and learn from my mistakes!

1 comment
is this code in a localscript or in a normal one? If it's a normal script then you have to make it a Local Script