guiText = game.StarterGui.PointDisplay.BackGround.TextLabel box = script.Parent.Box points = game.StarterPack.Points function onClick() box.Transparency = 1 box.CanCollide = false points.Value = points.Value + 1 guiText.Text = " Points: " ..points.Value box:Destroy() end box.ClickDetector.MouseClick:connect(onClick)
I was trying to make some sort of point system on Roblox but line 8(guiText.Text = " Points: " ..points.Value)won't run. My gui won't change at all. There are no errors in the output(Probably a small detail I didn't see). Is there a way I can make this work?
If the script is in the StarterGui, you can try this:
guiText = script.Parent.PointDisplay.BackGround.TextLabel
instead of:
guiText = game.StarterGui.PointDisplay.BackGround.TextLabel
You cannot do "game.StarterGui" because each Player has their own GUI, so: game.Players.PlayerGui