Assembly linear velocity is inconsistent

as in the title, im using a script for when a player touches a trampoline but the impulse is inconsistent, sometimes it will impulse a bit and sometimes it will impulse the desired velocity

local plr = game.Players.LocalPlayer

local hrp : Part = plr.Character:WaitForChild("HumanoidRootPart")

local cooldown = false


for i,v : Part in pairs(plr.Character:GetChildren()) do
	
	if v:IsA("MeshPart") or v:IsA("BasePart") or v:IsA("Part") then
		
		v.Touched:Connect(function(part)
			
			if part.Name == "Bumper" and cooldown == false then
				
				print("bump!")
				cooldown = true
				hrp.AssemblyLinearVelocity *= Vector3.new(1, 0, 1)
				hrp.AssemblyLinearVelocity += Vector3.new(0,80,0)
				
				task.wait(0.1) 
				
				cooldown = false
				
			end
			
		end)
		
	end
	
end
1 Like

Try using LinearVelocity or :ApplyImpulse instead, or it could just be a network ownership issue

with applyimpulse doesnt work at all and i already tried with linear velocity, it didnt work

alr i could solve the problem with this:

i made player to jump and then applied physics:

cooldown = true

humanoid:ChangeState(Enum.HumanoidStateType.Jumping)

task.wait(0.1)

hrp.AssemblyLinearVelocity *= Vector3.new(1, 0, 1)
hrp.AssemblyLinearVelocity += Vector3.new(0,80,0)
				
task.wait(0.1) 
				
cooldown = false
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.