#how would i weld a handle to right arm?
1 messages · Page 1 of 1 (latest)
it seems working to me?
fair
i dont know how to animate sorry ;-;
i mean its not an animation problem
i just needa know how to uh
yknow
you got any code thats not working properly? I can help with that
motor handle to right arm and stuff
sure
this is the code i made (and i know its absolute and utter
)
local Handle = Sword.Handle.Welds.Handle
Sword.Equipped:Connect(function()
local Player = game.Players:GetPlayerFromCharacter(Sword.Parent)
local Wielder = Player.Character:FindFirstChild("Right Arm")
if Wielder then
Handle.Part0 = Wielder
end
end)
Sword.Unequipped:Connect(function()
Handle.Part0 = nil
end)
no error messages right?
nope
what is marked as "Handle.Part1"?
its fine
but a note
handle is just a part essentially
maybe smth with AnimationPriority?
alright
it actually made the animation work better so thanks! (sword still doesnt work though)
wait so
wait hold on
if you move handle in swing animation
why did you weld the "Handle" part of the tool
you need to play animation on handle too
it already does that by default no?
i needed it on a motor for the animation to work :p
oh
wait fr?
right
lemme try that
im pretty sure it only works on humanoids, though?
unless im mistaken
AnimationController
You need an animation controller
its great you came i had never ever guessed that
not with the anim controller
:o
like i had never said to play animation on handle too
im not sure if it works 😭
ima test it rn
:p
i have it exported to roblox
a
i forgot to send the animation script
yea
-# p.s. ts doesnt mean "this" :P
oh alr
anyways heres the scripting code thing
local Player = PlayerService.LocalPlayer
local WeaponFolder = script.Parent
local Tool = WeaponFolder.Parent
local Handle = Tool:WaitForChild("Handle")
local AnimationsFolder = Handle:WaitForChild("Animations")
Tool.Equipped:Connect(function()
local IdleAnimation = AnimationsFolder:WaitForChild("Idle")
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
if Humanoid then
local Animator = Humanoid:FindFirstChildOfClass("Animator")
if Animator then
IdleTrack = Animator:LoadAnimation(IdleAnimation)
IdleTrack.Priority = Enum.AnimationPriority.Idle
IdleTrack:Play()
end
end
end)
Tool.Unequipped:Connect(function()
if IdleTrack then
if IdleTrack.IsPlaying then
IdleTrack:Stop()
end
end
end)
Tool.Activated:Connect(function()
local AttackAnimation = AnimationsFolder:WaitForChild("Slash")
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
if Humanoid then
local Animator = Humanoid:FindFirstChildOfClass("Animator")
if Animator then
local AttackTrack = Animator:LoadAnimation(AttackAnimation)
AttackTrack.Priority = Enum.AnimationPriority.Action4
AttackTrack:Play()
Tool.Unequipped:Connect(function()
if AttackTrack.IsPlaying then
AttackTrack:Stop()
end
end)
end
end
end)```
local AttackAnimation = AnimationsFolder:WaitForChild("Slash")
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
if Humanoid then
local Animator = Humanoid:FindFirstChildOfClass("Animator")
if Animator then
local AttackTrack = Animator:LoadAnimation(AttackAnimation)
AttackTrack.Priority = Enum.AnimationPriority.Action4
AttackTrack:Play()
Tool.Unequipped:Connect(function()
if AttackTrack.IsPlaying then
AttackTrack:Stop()
end
end)
end
end
end)
``` this is the attack part
** You are now Level 6! **
first
i dont think conneting connection in connetion is great idea 😄
i mean Tool.Unequipped in Tool.Activated
o
mrjamp knows better
fixed
rip
wdym?
in moon animator
i animated as others would with a tool in mind
welded it to the right arm [rather than torso since its only 1 part]
wdym?
added a motor to it and the right arm and yeah
can you give me your sword model
im 200% sure the fix is ez and we're just overcomplicating everything
nope :p
grr
models arent supported for motors
primarypart
;--;
howd you weld it?>
is the right arm Part0 or Part1?
hit me
here
wait
alr
in right arm
before you asked
i welded it exactly the same as the rig i used it with
so its in Right Arm and Part0 is always Right Arm and Part1 is Handle
yeppers
sure
uhh
show me sword in explorer
sure thing
it should be like this ig
oh like mid game or on the rig?
mid game
where is sword 😭
its in the tool
lemme try scripting it so it goes into the right arm
yeah it just errors when i do so thats a no
it likely woulda done nothing anyways