i made a “trampoline” using volicty while ancored, and when I stepped on it, it some time make me go a lot higher, and sometimes it work the way I want
the script:
local trampoline = script.Parent
trampoline.Velocity = Vector3.new(0,170, 0)
i made a “trampoline” using volicty while ancored, and when I stepped on it, it some time make me go a lot higher, and sometimes it work the way I want
the script:
local trampoline = script.Parent
trampoline.Velocity = Vector3.new(0,170, 0)
try apply velocty to player when he touches trampoline
local trampoline = script.Parent
trampoline.Touched:Connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
local root = hit.Parent.HumanoidRootPart
root.Velocity = Vector3.new(0, 170, 0)
end
end)
or use BodyVelocity
local trampoline = script.Parent
trampoline.Touched:Connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
local root = hit.Parent.HumanoidRootPart
local bv = Instance.new("BodyVelocity")
bv.MaxForce = Vector3.new(1,1,1) * 999999999999999
bv.Parent = root
bv.Velocity = Vector3.new(0, 170, 0)
game.Debris:AddItem(bv,0.1)
end
end)
I just tried your script and it works. Make sure the Part is anchored and the script is the child of the part.
What I just do is delete any welds that a part has, then set the AssemblyLinearVelocity to a Vector3 value, no scrips are needed. Make sure the AssemblyRootPart is the part you want to be the trampoline. The fix to your issue is not possible with the method I am describing here, I would just increase the jump power of the player and call it a day, but if you don’t want to do that, you should probably look into body velocitys.
it does work, but the character don’t always go the same height
huh, it seems like the player is too heavy? anyway the player is not moving for this one
then try set character Massless property to true, or use with BodyVelocity one
local trampoline = script.Parent
trampoline.Touched:Connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
local root = hit.Parent.HumanoidRootPart
root.Velocity = Vector3.new(0, 170, 0)
hit.Character.Massless = true
end
end)
You shouldn’t have to make the parts massless for velocity to effect them. I just tested the touched event and it makes the character jitter but doesn’t fling them up at all. I’m not sure why. If anyone else knows I’d love to know too because I thought something like that should of at least moved the character even if it didn’t make them go up to the same height.
alos hit.Character.Massless = true would be an error because hit is the part most likely your feet and the feet doesn’t have a child of character. you shouldn’t have to change the mass for velocity to have an effect so I don’t think we’ll need this anyways. plus if you make your char massless when you move it makes them slide slightly