Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Hey this script is not working?

This script should update a value in a GUI and also update a value in the leaderboard of same player. But it doesnn't work...

I used a normal script for this.

Source = script.Parent.Value
Display = script.Parent.Parent
Increment = 100
Leaderboard = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.leaderstats.Cash.Value

while true do
	wait(5)
	Source = Source + Increment
	Display.Text = Source
	Leaderboard = Source
end

1 comment

0

whats the output say??

1 answer

✓ Accepted answer

When you defined leaderboard, you defined it to it's value, and not the object itself, so instead of defining Leaderboard as the value, define it as the object:


Source = script.Parent.Value Display = script.Parent.Parent Increment = 100 Leaderboard = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.leaderstats.Cash

while true do wait(5) Source = Source + Increment Display.Text = Source Leaderboard.Value = Source end


This discussion is preserved as it was. New answers, comments, and votes are closed.