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

I want a part(x) to appear in my hand when I play an animation?

Asked by 7 years ago
Edited 7 years ago

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")

01Mouse.KeyDown:connect(function(key)
02key = key:lower()
03 if key == "q" then
04    local animationTack = Player.Character.Humanoid:LoadAnimation(animation)
05    animationTack:Play()
06    wait(3.2)
07    animationTack:Stop()
08    wait(.3)
09    local x = Instance.new("Part")
10    x.Shape = "Ball"
11    x.Material = "Neon"
12    x.BrickColor = BrickColor.new("Bright red")
13    x.TopSurface = "Smooth"
14    x.BottomSurface = "Smooth"
15    x.CanCollide = false
View all 26 lines...
0
Use a code block.. IfIWasntSoSwag 98 — 7y
0
i did DrDeath_GamingYT 2 — 7y
0
remove is depricated use Destroy saSlol2436 716 — 7y
0
connect and keyDown are also depricated saSlol2436 716 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Try creating a part called Handle and make you character equip it. You made a instance new right, but you should add a handle like x.Name = Handle local y = Instance.new("Tool") y.Name = AnimationTool y.Parent = game.Lighting and now the thing that will equip you the tool game.Players.LocalPlayer.Character.Humanoid:EquipTool(game.Lighting.AnimationTool) I dont know if this is right /\ I

Ad

Answer this question