Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would i make a player die on serverside some hours after they join the game?

Asked by
Tnipo 10
4 years ago

I'm making this waiting game and theirs a event that happens every certain amount of hours after a player joins. How would i make this?

0
I'm thinking remote events or just a script in ServerScriptService. Tnipo 10 — 4y
0
maybe Loot_O 42 — 4y
0
Just one player? Logophilic 37 — 4y
0
Multiple players so say 1 player enters the game their countdown starts then another player enters then their countdown starts. Tnipo 10 — 4y

1 answer

Log in to vote
0
Answered by
Dfzoz 489 Moderation Voter
4 years ago
Edited 4 years ago

If you mean you want to kill someone some time after they enter on the game you can do:

game.Players.PlayerAdded:Connect(function(newPlayer)
local char = player.Character or player.CharacterAdded:Wait()
wait(puttimetowaittokillplayerhere)
char.Humanoid.Health=0
end

If you want to make it so they die everytime some time pass after their character spawn you have to add player.CharacterAdded:Connect and put the killing code there.

Ad

Answer this question