RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Make a script where all entitys freeze when player is damaged"
-- server script game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild("Humanoid") humanoid.Damaged:Connect(function() for _, entity in pairs(game.Workspace:GetChildren()) do if entity:IsA("Model") then local humanoidEntity = entity:FindFirstChild("Humanoid") if humanoidEntity then humanoidEntity.PlatformStand = true end end end wait(5) -- duration of freeze for _, entity in pairs(game.Workspace:GetChildren()) do if entity:IsA("Model") then local humanoidEntity = entity:FindFirstChild("Humanoid") if humanoidEntity then humanoidEntity.PlatformStand = false end end end end) end) end)