Hi. For my game I have a rank system for cats. (Something like adopt me)
I tried to make that when your pet is full-grown, the rank will change with this simple code:
script.Parent.Text = -"Full Grown (level "..level")"
But it won't change...
When I do:
print(script.Parent.Text)
or
print(player.Character.blahblahbah.Cat.blahblahblah.BillboardGui.TextLabel.Text)
it prints the right text.
Does someone know why the text doesn't show anything, but when I print it, is says that the text is Full Grown with the level?
Here is the full code:
wait() local player = game.Players.LocalPlayer local leaderstats = player.leaderstats leaderstats.Level.Changed:Connect(function() local level = leaderstats:WaitForChild("Level").Value --print(script.Parent.Text) script.Parent.Text = -"Full Grown (level "..level")" --print(script.Parent.Text) end)
Hope someone can help :)
Yuri
Try this,
wait() local player = game.Players.LocalPlayer local leaderstats = player.leaderstats leaderstats.Level.Changed:Connect(function() local level = leaderstats:WaitForChild("Level").Value --print(script.Parent.Text) script.Parent.Text = "Full Grown"..Value --print(script.Parent.Text) end)
or
wait() local player = game.Players.LocalPlayer local leaderstats = player.leaderstats leaderstats.Level.Changed:Connect(function() local level = leaderstats:WaitForChild("Level").Value --print(script.Parent.Text) script.Parent.Text = "Full Grown"..level --print(script.Parent.Text) end)