So I am making a script that gives 10 KOs every 60 seconds.
The wait(1)
is a placeholder.
Can someone help?
Script:
local player = game.Players.LocalPlayer
wait(1)
player.leaderstats.KOs.Value = player.leaderstats.KOs.Value + 10 * (player.leaderstats.ReKOs.Value + 1)
Edit: There is a line down before the wait(1) and player.leaderstats.
You cannot use LocalPlayer on the server. You could use a remote event for example Server Script:
RemoteEvent.OnServerEvent:Connect(function(player)
end)
You do not need to use game.Players to start you would do "player.Character" for example
To fire this Remote you would use:
RemoteEvent:FireServer()
On the client
But in your case you would do this
local WaitTime = 1 game.Players.PlayerAdded:connect(function(player) while true do wait(WaitTime) player.leaderstats.KOs.Value = player.leaderstats.KOs.Value +10 end end)