RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Can you create a script that when it is executed turns everyone into zombies?"
-- server script local ZombieAnimation = "rbxassetid://YourZombieAnimationIDHere" -- Replace with your zombie animation ID game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild("Humanoid") local animator = character:WaitForChild("Animate") local zombieAnimation = Instance.new("Animation") zombieAnimation.AnimationId = ZombieAnimation local zombieTrack = humanoid:LoadAnimation(zombieAnimation) -- Replace the default walk and run animations with the zombie animation animator.walk.WalkAnim.AnimationId = ZombieAnimation animator.run.RunAnim.AnimationId = ZombieAnimation -- Play the zombie animation continuously zombieTrack.Looped = true zombieTrack:Play() end) end) -- Turn existing players into zombies for _, player in ipairs(game.Players:GetPlayers()) do local character = player.Character if character then local humanoid = character:FindFirstChild("Humanoid") local animator = character:FindFirstChild("Animate") if humanoid and animator then local zombieAnimation = Instance.new("Animation") zombieAnimation.AnimationId = ZombieAnimation local zombieTrack = humanoid:LoadAnimation(zombieAnimation) -- Replace the default walk and run animations with the zombie animation animator.walk.WalkAnim.AnimationId = ZombieAnimation animator.run.RunAnim.AnimationId = ZombieAnimation -- Play the zombie animation continuously zombieTrack.Looped = true zombieTrack:Play() end end end