RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make it so the .died cant fire multiple times in a short amount of time"
-- server script local Players = game:GetService("Players") local debounce = false Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) character:WaitForChild("Humanoid").Died:Connect(function() if debounce == false then debounce = true game.ReplicatedStorage.RespawnEvent:FireClient(player) wait(3) -- wait for 3 seconds before the next event can be fired debounce = false end end) end) end) game.ReplicatedStorage.RespawnRequest.OnServerEvent:Connect(function(player) if debounce == false then debounce = true wait(0.3) player:LoadCharacter() wait(3) -- wait for 3 seconds before the next event can be fired debounce = false end end)