when the player sit in a seat, play an animation with tools. Is it possible?
I create the animation with the object I want. and when I put in the script to play the animation, how do I add the tool?
when the player sit in a seat, play an animation with tools. Is it possible?
I create the animation with the object I want. and when I put in the script to play the animation, how do I add the tool?
what do you mean? you want a player to play an animation when they sit?
Yes. Example, the player sits at the dinner table and a glass of juice appears in his hand and he does the animation with the glass. Or when he sits at the table, he takes the glass that’s already on the table and drinks. like that.
do only the animation when it sits I already know. I now want to learn how to animate with objects when the person sits
it doesn’t have to be just when the person sits down. but it can also be when the person touch a part. It does the animation with the object (that’s what I want)
local tool = script.Parent
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://"
local track
tool.Equipped:Connect(function()
track = script.Parent.Parent.Humanoid:LoadAnimation(Anim)
track.Priority = Enum.AnimationPriority.Action
track.Looped = false
track:Play()
end)
tool.Unequipped:Connect(function()
if track then
track:Stop()
end
end)
This is for tool. I found on devforum. try editing it to fit your needs.
I created this model. its working…
but you should configure this touch with toggle, etc. to prevent the player from taping the part and clone many objects.
Do you have a video that could further help me understand?