I am trying to make a bar go down when something is clicked but when it is clicked there is no error and nothing changes, what is the problem?
Hits = 10 function Clicked(player) local Gui = player.PlayerGui.ScreenGui.Damage local Green = Gui.Green local XScale = Green.Size.X.Scale local DecreasePerHit = 0.957 / Hits XScale = XScale - DecreasePerHit end Rock.ClickDetector.MouseClick:Connect(Clicked)
Use RemoteEvents because setting GUI in a server script won’t work since GUIs can only be accessed by the client to prevent hacks.