Okay so I have an argument and I’m not sure how I’d add something like + 1
to it. You can’t do something like player.leaderstats.Stage.Value == player.leaderstats.Stage.Value + 1
nor +10
because it’ll error.
The :FireServer() argument:
remoteEvent:FireServer("updateCurrent", 10)
remoteEvent:FireServer("updateSpawnPoint", 10)
There are two ways to do this. The first way would be to calculate the new value on the client, and then sending that to the server. The other way would be for the server to calculate the final value.
Method 1:
-- on client:
remoteEvent:FireServer("updateCurrent", player.leaderstats.Stage.Value + 10)
Method 2:
-- on server:
remoteEvent.OnServerEvent:Connect(function(client, delta)
player.leaderstats.Stage.Value = player.leaderstats.Stage.Value + delta
end)
1 Like