Scripting Support - Overhead Rank

I’m trying to make this TextLabel change when the value of a number value changes EG: If the value is 1 then it will say “Warnings: 1”

This is my current script

game.Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("IntValue")
	leaderstats.Name = "leaderstats"
	leaderstats.Value = 1

	local warns = Instance.new("NumberValue")
	warns.Name = "Warnings"
	warns.Value = 0

	warns.Parent = leaderstats
	leaderstats.Parent = player
end)
while true do
	if game.Players:FindFirstChild(script.Parent.Parent.Username.Text) then
		game.Players:FindFirstChild(script.Parent.Parent.Username.Text):WaitForChild('leaderstats')
		script.Parent.Text = "Warnings: "..game.Players:FindFirstChild(script.Parent.Parent.Username.Text).leaderstats.Warnings.Value
	end
	wait()
end

If anyone can help that would be amazing!

Thanks - Aspect

1 Like

Hey Apsect,

Is there anything in output?

Hi there Cookie, I will reply to this tomorrow since my pc is acting up but from memory there is stuff in the output will send it tommorrow.

Fantastic, let me know how it goes.


image
These are the only errors.

Right, it seems to be not working since I was adding it via the player’s tab and not with the basic admin command. Anyways thanks for your time Cookie.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.