#TextLabel String not changing

8 messages · Page 1 of 1 (latest)

spiral oxide
#

Im sure i scripted my code correctly and it wont change no matter what I've also checked that the locations and stuff are right and nothing happens...

My code
wait(5)

local tree = script.Parent

SeedCount = 0

local clickDetector = tree:FindFirstChild("ClickDetector")

function UpdateSeeds()
game.StarterGui.ScreenGui.Seeds.TextLabel.Text = tostring(SeedCount)
print("function is working")
end

if clickDetector then
clickDetector.MouseClick:Connect(function()
SeedCount = SeedCount + 1
UpdateSeeds()
print("clicked") -- Checks if click script worked

end)

end

restive sapphire
#

Any errors?

#

Oh God... You are using StarterGui in a script...

spiral oxide
#

....

#

i am

spiral oxide
restive sapphire
# spiral oxide ....

I wasnt trying to be an a$sh0le, but if you are using StarterGui in a script you wont see anything changed