so, I created a script that changes a GUI to show what level a player is at.
game.Players.PlayerAdded:Wait() function onChanged() script.Parent.Text = script.Parent.Parent.Parent.Parent.RespawnLocation.Name end end script.Parent.Parent.Parent.Parent.RespawnLocation.Changed:Connect(onChanged())
I said that the text that appeared in the Gui would be the name of the Player's RespawnLocation
my problem is that the function does not activate, even when the RespawnLocation is changed of the player
From what I know you can't use () of the function call in the event parameters. So remove the brackets so it's like this:
game.Players.PlayerAdded:Wait() function onChanged() script.Parent.Text = script.Parent.Parent.Parent.Parent.RespawnLocation.Name end end script.Parent.Parent.Parent.Parent.RespawnLocation.Changed:Connect(onChanged) -- removed ()