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

How can I fix this Clone Script?

Asked by 9 years ago
01wait(1)
02 
03local player = game.Players.LocalPlayer
04local Mouse = player:GetMouse()
05local humanoid = player.Character.Humanoid
06local s = humanoid:LoadAnimation(game.StarterPack.HandSign.Animation)
07 
08 
09 
10 
11 
12Mouse.KeyDown:connect(function(key)
13game.Players.PlayerAdded:connect(function(player)
14player.CharacterAdded:connect(function(character)
15    local CharacterChildren = character:GetChildren()
View all 25 lines...

I'm trying to make the player play an animation, wait .7 seconds, then a clone to spawn right behind him when the player presses h. But I tried like 20 times. Now I'm here asking for help. Can ANYONE help? No one is helping me.

1 answer

Log in to vote
0
Answered by
FOG20 5
9 years ago

wait(1)

local player = game.Players.LocalPlayer local Mouse = player:GetMouse() local humanoid = player.Character.Humanoid local s = humanoid:LoadAnimation(game.StarterPack.HandSign.Animation)

Mouse.KeyDown:connect(function(key) game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) local CharacterChildren = character:GetChildren() for i,v in pairs(CharacterChildren) do local Clone = v:Clone() if key:lower() == "h" and humanoid then s:Play() player.Character.Humanoid.WalkSpeed = 16 wait(.7) Clone.Parent = game.Workspace.Character end end end)

does this this work? use print to test it if you don't know

Ad

Answer this question