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

how to set off a animation on a model?

Asked by 6 years ago

I wanna figure out how to set off a animation that is on a model.

0
I have replied to this same question multiple times. Please specify what part of my script didn't work and stop reposting this question. mattscy 3725 — 6y
0
apparently that the link you linked to him was not available (for me atleast) Astralyst 389 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Main Idea:

Ok, a model is a group of parts, when those parts are grouped together it makes a model. Although you cannot and will not be able to animate a model unless it's a rig.

How to add an animation to a rig:

Now it should be very easy to go to the plugins tab, and open the rig builder up. (Roblox Pre-Installed Plugin, so you should have it). Now what you can do to make the rig more realistic is add clothes to your specifications, but that isn't what I'm teaching you. So now insert an object into the rig, and click animation. change theanimationIdto "rbxassetid://Id" now insert a script into the rig and type this

script.Parent.HumanoidRootPart.Transparency = 1

wait(3)
local hum = script.Parent.Humanoid
local anim = hum:LoadAnimation(script.Parent.Animation)

Other Possibilities

Now if you want the animation to repeat forever, you could two things.

1You can edit the animation, and set looping to true in the edit tab.

2You can do what is called a while true do loop. A while true do loop makes the script repeat itself until told other wise. So now type this. (If you want it repeating.)

while true do
script.Parent.HumanoidRootPart.Transparency = 1

wait(3)
local hum = script.Parent.Humanoid
local anim = hum:LoadAnimation(script.Parent.Animation)
end
Ad

Answer this question