Watch Untitled by VRTLAL and millions of other Roblox Studio videos on Medal. Tags: #robloxstudio
#How do I make the arm move with animation?
1 messages · Page 1 of 1 (latest)
Play animation when u activate the tool by loading the anim with animator inside humanoid
Send full script??
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
Why not play the animation on the local script and make bullet firing on server?
Im sure the ai can help
im not using ai
also i want animation to be seen by everyone
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
Can u send the script inside your tool
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
Which code did u fire to the server?
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
Try printing if animator exists and check if u own the animation
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
looks a bit ai icl
the comments
maybe it isnt
alr buddy
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
never said its false
sure
explain in detail
and send me the script
script is here
vid here
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
oh thats easy
the idle animation or walk animation is probably interfering with it
shootAnim.Priority = Enum.AnimationPriority.Action
@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)
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
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
Animation priority like he said.
use a remoteEvent
wdym he literally used it