My problem is the fact that when you go into first person, jump, and hold a or s, you fly to the left. This has never really happened to me before, and I don't know why it is happening.
Here are my two Local Scripts
local CanAttack = true
script.Parent.Activated:connect(function()
local attack = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack)
if CanAttack == true then
attack:Play()
CanAttack = false
wait(1)
attack:Stop()
CanAttack = true script.Parent.CanDamage.Value = true
end
end)
Here is my second.
local spear = script.Parent
local function Equip()
idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle) idle:Play() end local function Unequip() idle:Stop() end spear.Equipped:connect(Equip) spear.Unequipped:connect(Unequip)
My other script
script.Parent.blade.Touched:connect(function(p)
if script.Parent.CanDamage.Value == true then
script.Parent.CanDamage.Value = false
p.Parent.Humanoid:TakeDamage(50)
end
end)
My best guess is that since the spear is facing left, not forward, the regular Roblox animations load and get confused with the weird position and fly to the left. To better explain what my spear looks like, imagine a regular spear with no animations, but the tip and the stick is facing to the left of the player.

2 comments
Use a code block
Are the Baseparts of your tool cancollide off?