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

How do dummy pack up/take out tools?

Asked by 6 years ago
Edited 6 years ago

I just give Dummy a Phone, And i want He do a playing phone animation when he idle. But when he do taking order animation(He is waiter), i wanna he pack up his phone. What should i do? And here is my code.

local Dummy = game.Workspace.BurgerCashier1.Humanoid
local Phone = game.Workspace.BurgerCashier1.RoPhone

game.Workspace.BurgerCashier1.Head.Dialog.DialogChoiceSelected:connect(function(player,choice)
    if choice.Name ~= "Nevermind"  then
        if choice.Name ~= "Yes" then
            local Animation = Instance.new("Animation")
            Animation.AnimationId = "rbxassetid://1746550257"
            local Play = Dummy:LoadAnimation(Animation)
            Play.Looped = false
            Play:stop()
            Play:play()
            wait(3.2)
            --This is about he taking order.
        else
            local Animation = Instance.new("Animation")
            Animation.AnimationId = "rbxassetid://619511648"
            local Play = Dummy:LoadAnimation(Animation)
            Play.Looped = true
            Play:stop()
            Play:play()
            --This is about he playing phone.
        end
    end
end)

Thank you!

1 answer

Log in to vote
0
Answered by
Galicate 106
6 years ago
Humanoid:EquipTool(script.Parent.Phone)
0
Oh thanks! i'll try it. MEndermanM 73 — 6y
0
Im referencing the phone as if its a tool inside the character model. and the script is inside the Character model too. Just remember Humanoid:EquipTool() Galicate 106 — 6y
0
Wouldn’t the tool already be equipped if it was directly inside the character? Also the wiki said :EquipTool() only works on humanoids associated with players. User#20279 0 — 6y
0
Oh wait!! How about Unequip? MEndermanM 73 — 6y
Ad

Answer this question