So I am making an indiana jones themed adventure game and am trying to make an extra lives GUI but for some reason their is no print statement and the text is not changing either. I assume the problem lies in the changed event but I cannot be sure. I tried everything and I need help! I also double checked the hierarchy three times and it adds up.
script.Parent.ExtraLives.Changed:Connect(function() print("changed") wait() script.Parent.HealthBars.ExtraLivesText.Lives.Text = "+"..script.Parent.ExtraLives.Value end)
Changed doesnt work on a gui as far as i know, so use :GetPropertyChangedSignal(your property)
for example
--for a gui local gui=game.Players.LocalPlayer.PlayerGui.Some.Random.Gui gui:GetPropertyChangedSignal("Text"):Connect(function() --your code here end) --for a value local val=game:GetService("ReplicatedStorage"):WaitForChild("Value") val:GetPropertyChangedSignal("Value"):Connect(function() end)