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