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

Animation not working after being welded to the character , why?

Asked by 8 years ago

I've been trying to animate a custom model , i've connected it with motor 6d and all that stuff , i'm able to make it play if it's not welded to the character , i think the problem is the weld script i use , since first i unanchor all the parts before welding them to the torso , and then i weld them , any idea of what i'm doing wrong?

Animation script: Player = game.Players.LocalPlayer mouse = Player:GetMouse() function onKeyDown(key)

if key == "e" then local animController = Instance.new("AnimationController") animController.Parent = Player.Character.Owl local Animation = script.Animation

local Current = animController:LoadAnimation(Animation) Current:Play()

end

end mouse.KeyDown:connect(onKeyDown)

Weld script : local prev local parts = script.Parent:GetChildren()

for i = 1,#parts do if (parts[i].className == "Part") or (parts[i].className == "WedgePart") or (parts[i].className == "UnionOperation") then if (prev ~= nil)then local weld = Instance.new("Weld") weld.Part0 = prev weld.Part1 = parts[i] weld.C0 = prev.CFrame:inverse() weld.C1 = parts[i].CFrame:inverse() weld.Parent = prev end prev = parts[i] end end

0
There is a possible problem that you are trying to weld objects that are currently in workspace. If that is the case, then it would be better to use that script as a Touched event. Rather than trying to weld it before the player joins. scottmike0 40 — 8y
0
I have had a similar problem. I was making a third person camera, using LockFirstPerson, but when I welded my fake torso to my main torso, all of my animations broke. TheDeadlyPanther 2460 — 8y
0
@scottmike0 I think it has something to do with torso being the center of animations or something. View my comment above for more info. TheDeadlyPanther 2460 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

I've fixed it , the problem was the weld script , i tried animating something that was welded , i just connected with with Motor6D , and everything worked , TY everyone anyway.

Ad

Answer this question