#How do I make the arm move with animation?

1 messages · Page 1 of 1 (latest)

inland bronze
#

The arm is stiff

dreamy wing
#

Play animation when u activate the tool by loading the anim with animator inside humanoid

inland bronze
#

I did

#

but it did not work

#

@dreamy wing

dreamy wing
#

Send full script??

inland bronze
#

K

#

how do i send in the cool format

#

local shoot = script.Parent.Shoot
local handle = script.Parent:FindFirstChild("Handle")
local debris = game:GetService("Debris")
local sound = game.ReplicatedStorage.FireBeam
local debounce = true

shoot.OnServerEvent:Connect(function(plr, mousePos)

if not debounce then
    return
end
debounce = false

--Animation
local humanoid = plr.Character:FindFirstChild("Humanoid")
local shootAnim = Instance.new("Animation")
shootAnim.AnimationId = "rbxassetid://95364017272840"
local animTrack = humanoid.Animator:LoadAnimation(shootAnim)
animTrack:Play()

--Bullet firing
local character = plr.Character
local hrp = character:FindFirstChild("HumanoidRootPart")
local bullet = Instance.new("Part")
bullet.Parent = workspace
bullet.Anchored = false
bullet.Shape = Enum.PartType.Ball
bullet.CFrame = hrp.CFrame
bullet.Color = Color3.new(1, 0, 0)
bullet.CanCollide = false
bullet.Size = Vector3.new(3, 3, 3)
bullet.Touched:Connect(function(hit)
local character = plr.Character
if hit.Parent == character then
return
end
if hit.Parent:FindFirstChild("Humanoid") then
local humanoid = hit.Parent:FindFirstChild("Humanoid")
humanoid:TakeDamage(3)
end
end)
--sfx
local newSound = sound:Clone()
newSound.Parent = handle
newSound:Play()

local direction = (mousePos - handle.Position).unit
bullet.Velocity = direction * 250

wait(1)
debounce = true


debris:AddItem(bullet, 5)

end)

#

@dreamy wing

dreamy wing
#

Why not play the animation on the local script and make bullet firing on server?

#

Im sure the ai can help

inland bronze
#

im not using ai

inland bronze
dreamy wing
#

Everyone can see animations if you play it in ur localscript

#

And animator might not exists so u might wanna create if there is not one

inland bronze
#

Alr'

#

@dreamy wing

#

I did it

#

but i don't understand how that helps my problem

dreamy wing
#

Can u send the script inside your tool

inland bronze
#

sure

#

this is the serverscript: local shoot = script.Parent.Shoot
local handle = script.Parent:FindFirstChild("Handle")
local debris = game:GetService("Debris")
local sound = game.ReplicatedStorage.FireBeam
local debounce = true

shoot.OnServerEvent:Connect(function(plr, mousePos)

if not debounce then
    return
end
debounce = false

--Animation
local humanoid = plr.Character:FindFirstChild("Humanoid")
local shootAnim = Instance.new("Animation")
shootAnim.AnimationId = "rbxassetid://95364017272840"
local animTrack = humanoid.Animator:LoadAnimation(shootAnim)
animTrack:Play()

--Bullet firing
local character = plr.Character
local hrp = character:FindFirstChild("HumanoidRootPart")
local bullet = Instance.new("Part")
bullet.Parent = workspace
bullet.Anchored = false
bullet.Shape = Enum.PartType.Ball
bullet.CFrame = hrp.CFrame
bullet.Color = Color3.new(1, 0, 0)
bullet.CanCollide = false
bullet.Size = Vector3.new(3, 3, 3)
bullet.Touched:Connect(function(hit)
local character = plr.Character
if hit.Parent == character then
return
end
if hit.Parent:FindFirstChild("Humanoid") then
local humanoid = hit.Parent:FindFirstChild("Humanoid")
humanoid:TakeDamage(3)
end
end)
--sfx
local newSound = sound:Clone()
newSound.Parent = handle
newSound:Play()

local direction = (mousePos - handle.Position).unit
bullet.Velocity = direction * 250

wait(1)
debounce = true


debris:AddItem(bullet, 5)

end)

#

@dreamy wing

#

already sent it erealier

dreamy wing
#

Which code did u fire to the server?

inland bronze
#

local tool = script.Parent
local shoot = tool.Shoot

local mouse = game.Players.LocalPlayer:GetMouse()
local debounce = true

tool.Activated:Connect(function()
if not debounce then
return
end
debounce = false

local humanoid = tool.Parent:FindFirstChild("Humanoid")

local shootAnim = Instance.new("Animation")
shootAnim.AnimationId = "rbxassetid://95364017272840"
local animTrack = humanoid.Animator:LoadAnimation(shootAnim)
animTrack:Play()

local mousePos = mouse.Hit and mouse.Hit.Position or nil
shoot:FireServer(mousePos)
wait(1.5)
debounce = true

end)

#

ignore the anim thing

#

this was before i movedf the animations to the local

dreamy wing
#

Try printing if animator exists and check if u own the animation

inland bronze
#

Btw

#

are we on the same problem]

#

The animation works'

#

its just the arm that holds the tool doesnt move

#

i want it to move

#

and not be stiff

#

@dreamy wing

dreamy wing
#

Oh so animation works except the hand

#

Set animation priority

inland bronze
#

bro

#

why are yall saying its ai

placid merlin
#

the comments

inland bronze
#

bro

#

those are my comments

placid merlin
#

maybe it isnt

inland bronze
#

alr buddy

placid merlin
#

theo nly green flag i got is the --sfx comment

#

the rest looks ai

inland bronze
#

idk why u want that to be tru

#

alr all i worry about is that its my work

#

and i know it

#

so it doesnt matter

#

but can yall help me bro

placid merlin
placid merlin
#

explain in detail

#

and send me the script

inland bronze
#

My arm is stiff when playing the animation

#

how do I make it so it plays the animation with the arm moving

#

because in the Original anim

#

the arm moves

placid merlin
#

oh thats easy

inland bronze
#

How

#

what do i do]

placid merlin
#

the idle animation or walk animation is probably interfering with it

inland bronze
#

how do i fix that

#

do i do like

#

animation priorty or something

placid merlin
#

shootAnim.Priority = Enum.AnimationPriority.Action

inland bronze
#

Alr

#

lemme try

#

ty

#

o ye

#

i tried this earlier

#

it doesnt work

placid merlin
#

@inland bronze or u can paste this fixed code
local shoot = script.Parent.Shoot
local handle = script.Parent:FindFirstChild("Handle")
local debris = game:GetService("Debris")
local sound = game.ReplicatedStorage.FireBeam
local debounce = true

shoot.OnServerEvent:Connect(function(plr, mousePos)
if not debounce then
return
end
debounce = false

local humanoid = plr.Character:FindFirstChild("Humanoid")
local shootAnim = Instance.new("Animation")
shootAnim.AnimationId = "rbxassetid://95364017272840"
shootAnim.Priority = Enum.AnimationPriority.Action
local animTrack = humanoid.Animator:LoadAnimation(shootAnim)
animTrack:Play()

local character = plr.Character
local hrp = character:FindFirstChild("HumanoidRootPart")
local bullet = Instance.new("Part")
bullet.Parent = workspace
bullet.Anchored = false
bullet.Shape = Enum.PartType.Ball
bullet.CFrame = hrp.CFrame
bullet.Color = Color3.new(1, 0, 0)
bullet.CanCollide = false
bullet.Size = Vector3.new(3, 3, 3)
bullet.Touched:Connect(function(hit)
    local character = plr.Character
    if hit.Parent == character then
        return
    end
    if hit.Parent:FindFirstChild("Humanoid") then
        local humanoid = hit.Parent:FindFirstChild("Humanoid")
        humanoid:TakeDamage(3)
    end
end)

local newSound = sound:Clone()
newSound.Parent = handle
newSound:Play()

local direction = (mousePos - handle.Position).unit
bullet.Velocity = direction * 250

wait(1)
debounce = true

debris:AddItem(bullet, 5)

end)

inland bronze
#

Doesnt work

#

Priority is not a valid member of Animation "Animation"

placid merlin
#

local shoot = script.Parent.Shoot
local handle = script.Parent:FindFirstChild("Handle")
local debris = game:GetService("Debris")
local sound = game.ReplicatedStorage.FireBeam
local debounce = true

shoot.OnServerEvent:Connect(function(plr, mousePos)
if not debounce then
return
end
debounce = false

local humanoid = plr.Character:FindFirstChild("Humanoid")
local shootAnim = Instance.new("Animation")
shootAnim.AnimationId = "rbxassetid://95364017272840"
local animTrack = humanoid.Animator:LoadAnimation(shootAnim)
animTrack.Priority = Enum.AnimationPriority.Action
animTrack:Play()

local character = plr.Character
local hrp = character:FindFirstChild("HumanoidRootPart")
local bullet = Instance.new("Part")
bullet.Parent = workspace
bullet.Anchored = false
bullet.Shape = Enum.PartType.Ball
bullet.CFrame = hrp.CFrame
bullet.Color = Color3.new(1, 0, 0)
bullet.CanCollide = false
bullet.Size = Vector3.new(3, 3, 3)
bullet.Touched:Connect(function(hit)
    local character = plr.Character
    if hit.Parent == character then
        return
    end
    if hit.Parent:FindFirstChild("Humanoid") then
        local humanoid = hit.Parent:FindFirstChild("Humanoid")
        humanoid:TakeDamage(3)
    end
end)

local newSound = sound:Clone()
newSound.Parent = handle
newSound:Play()

local direction = (mousePos - handle.Position).unit
bullet.Velocity = direction * 250

wait(1)
debounce = true

debris:AddItem(bullet, 5)

end)

#

try this

inland bronze
#

oh

#

it works

#

ty

#

What did you change?

#

@placid merlin

placid merlin
#

er

#

are u slow

#

local humanoid = plr.Character:FindFirstChild("Humanoid")
local shootAnim = Instance.new("Animation")
shootAnim.AnimationId = "rbxassetid://95364017272840"
local animTrack = humanoid.Animator:LoadAnimation(shootAnim)
animTrack.Priority = Enum.AnimationPriority.Action
animTrack:Play()

#

this part

inland bronze
#

I knowe'

#

but what was wrong with mine

dreamy wing
#

Animation priority like he said.

proud cove
#

use a remoteEvent

dreamy wing