Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I make it lunge slower for a sword?

function Lunge()
	Damage = DamageValues.LungeDamage
	Sounds.Lunge:Play()
	local Anim = Instance.new("StringValue")
	Anim.Name = "toolanim"
	Anim.Value = "Lunge"
	Anim.Parent = Tool	
	local Force = Instance.new("BodyVelocity")
	Force.velocity = Vector3.new(0, 10, 0) 
	Force.maxForce = Vector3.new(0, 4000, 0)
	Debris:AddItem(Force, 0.5)
	Force.Parent = RootPart
	wait(0.25)
	SwordOut()
	wait(0.25)
	if Force and Force.Parent then
		Force:Destroy()
	end
	wait(0.5)
	SwordUp()
end

1 answer

✓ Accepted answer

maybe try to decrease force.velocity and increase the time it takes for the body velocity to be destroyed

function Lunge()
    Damage = DamageValues.LungeDamage
    Sounds.Lunge:Play()
    local Anim = Instance.new("StringValue")
    Anim.Name = "toolanim"
    Anim.Value = "Lunge"
    Anim.Parent = Tool  
    local Force = Instance.new("BodyVelocity")
    Force.velocity = Vector3.new(0, 5, 0) 
    Force.maxForce = Vector3.new(0, 4000, 0)
    Debris:AddItem(Force, 1)
    Force.Parent = RootPart
    wait(0.5)
    SwordOut()
    wait(0.5)
    if Force and Force.Parent then
        Force:Destroy()
    end
    wait(0.5)
    SwordUp()
end

1 comment

0

Thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.