For some reason a simple script that I wrote, that should call a function whenever a player joins, which after that checks if the players ID is one of the either.
game.Players.PlayerAdded:Connect(function(player)
print("player join")
if player.UserId == 3193848005 or 2601513514 then
print("owner join")
ms.stamina.Value = 250
ms.maxstamina.Value = 250
ms.recover.Value = 10
end
end)
As well as I understand, a local script runs after you launch the server, and join. Which means that it can’t utilise PlayerAdded if YOU join. My problem is that the changes still have to remain client sided, so that the stats only change for the player that joined if he is either of above UserIds. Does anyone has an answer?