Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Hey this script is not working?

Asked by 9 years ago

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
0
whats the output say?? NinjoOnline 1146 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

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

Ad

Answer this question