I want a part(x) to appear in my hand when I play an animation.Here is my code, thanks. Player = game.Players.LocalPlayer Mouse = Player:GetMouse() animation = script:WaitForChild("Animation")
Mouse.KeyDown:connect(function(key)
key = key:lower()
if key == "q" then
local animationTack = Player.Character.Humanoid:LoadAnimation(animation)
animationTack:Play()
wait(3.2)
animationTack:Stop()
wait(.3)
local x = Instance.new("Part")
x.Shape = "Ball"
x.Material = "Neon"
x.BrickColor = BrickColor.new("Bright red")
x.TopSurface = "Smooth"
x.BottomSurface = "Smooth"
x.CanCollide = false
x.Anchored = false
x.CFrame = Player.Character.RightHand.CFrame * CFrame.new(0,0,-2)
local v = Instance.new("BodyVelocity", x)
v.velocity = Player.Character.Head.CFrame.lookVector * 90
v.maxForce = Vector3.new(math.huge, math.huge, math.huge)
x.Parent = workspace
wait(10)
x:remove()
end
end)

4 comments
Use a code block..
i did
remove is depricated use Destroy
connect and keyDown are also depricated