So I have a script here:
Button = script.Parent.TextButton
player = script.Parent.Parent.Parent
ready = player.Ready
Button.MouseButton1Click:connect(function()
if ready.Value == 1 then
ready.Value = 0
Button.Text = "AFK"
end
if ready.Value == 0 then
ready.Value = 1
Button.Text = "Active"
end
end)
I checked everything and all the values like button player and ready are correctly identifying their objects. (the player value is the parent of started GUI). When I run the script and try to trigger the text button, nothing happens and there is no error in the output.. What is the solution?

1 comment
Show me the script where the they TP or do something with the players. It can contain there a fault.