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

How do i make an idle for a tool that starts when picked up?

Asked by 5 years ago

Okay so, im trying to make idles for all my personal items to hold in games. they arent weapons, just social things

No matter how hard i try it isn't working. I want it to also work while the player is moving. I have an animation and everything for it, it doesn't effect the legs though. The animation in general wont start, here is my script i am using a local script i placed it straight into the tool the 0000's in the script are where i put the id of it

local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character:FindFirstChild("Humanoid")

moving = false

game.Workspace.Player.Humanoid.Running:Connect(function(speed)

if speed > 0 then

    moving = true

else

    moving = false

    end

end)

if not moving then

local animation = Instance.new("Animation")

animation.AnimationId = "http://www.roblox.com/Asset?ID=0000"

local animationTrack = humanoid:LoadAnimation(animation)

animationTrack:Play()

end
0
you should probably set an asset id HDWC 53 — 5y
0
disable the legs for the animation MmadProgrammer 35 — 5y
0
and just put an animation inside the tool MmadProgrammer 35 — 5y
0
how do you set an asset id? tails2049 0 — 5y
0
he did set an id "the 0000’s in the script are where i put the id of it" Fad99 286 — 5y

Answer this question