I have made a game and there are buttons when you press it there's a sound and there's a countdown as well. If I press the button in testing mode nothing happens only the sound plays. Here's the code:
function onClicked() wait(0.5) game.StarterGui.CountDownNo.Three.ImageTransparency = 0 -- Number Three Appears script.Parent.Sound:Play() wait(1) game.StarterGui.CountDownNo.Three.ImageTransparency = 1 -- Number Three Disappears game.StarterGui.CountDownNo.Two.ImageTransparency = 0 -- Number Two Appears wait(1) game.StarterGui.CountDownNo.Two.ImageTransparency = 1 -- Number Two Dissapears game.StarterGui.CountDownNo.One.ImageTransparency = 0 -- Number One Appear wait(1) game.StarterGui.CountDownNo.One.ImageTransparency = 1 -- Number One Disappears end script.Parent.ClickDetector.MouseClick:connect(onClicked)
Please help! I'm new to scripting.
I changed
game.StarterGui.CountDownNo.Three.ImageTransparency = 0 -- Number Three Appears
to
game.Player.LocalPlayer.PlayerGui.CountDownNo.Three.ImageTransparency = 0 -- Number Three Appears
I modified StarterGui, Which is what gets copied over to a player's PlayerGui so nothing was updated.