This function is not working, im trying to make text update instantly but it cant find the player. Also if i run the game, look in the players part of the explorer and find my user name and open that up there is a value that is called RebirthCost that is attached to the player
game.Players.LocalPlayer.RebirthCost.Changed:Connect(function() script.Parent.Cost_Multiplier.Text = "Cost: $" .. game.Players.LocalPlayer.Cost.Value .. ", Multiplier: x" .. game.Players.LocalPlayer.Rebirths.Value + 1 * 2 end)
create the var in a regular script
game.Players.PlayerAdded:Connect(function(plr) local Value = Instance.new("IntValue") Value.Name = "RebirthCost" Value.Parent = plr.Character Value.Value = 100 end)
We found the answer in the chat, he had to use WaitForChild in case it hasn't loaded yet