So I need it so every time a player walks on this button a number value in their GUI will change. It's supposed to go up by one every time the player walks on it. Instead it does nothing. There seems to be something wrong with the way I am changing the number value I just don't know how to properly do it.
script.Parent.Touched:connect(function(player) -- 'player' is the part that touches it, nothing else.. So it's either going to be the Left Leg or the Right Leg of the player.. plr = game.Players:FindFirstChild(player.Parent.Name) -- This is going to get the player itself plr.PlayerGui.Points.FPoints.Points.Value = + 1 -- now this should change the GUI for the player. end)
The way I am changing the Value seems to be wrong idk how to change it though.
In line 3,
plr.PlayerGui.Points.FPoints.Points.Value = + 1
should be
plr.PlayerGui.Points.FPoints.Points.Value = plr.PlayerGui.Points.FPoints.Points.Value + 1
In computer programming, you have to take the value of the current integer and add it by one & set it equal to the integer variable or desired object storing an integer variable.