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)
if key:lower() == "h" and humanoid then
s:Play()
wait(.7)
player:Clone()
end
end)
Output says nothing.
Obviously, when a player presses H an animation plays, wait .7 seconds then the player is cloned. The animation plays, but I'm not being cloned. Help?
-----------------------EDITED----------------------------
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)
Output says: 19:54:49.675 - Error in script: 'end' expected (to close 'function' at line 13) near ''

2 comments
Are you trying the clone the character, or the player in the game?
The player... like the player with the clothes n stuff...