this script lets the player launch into the sky but when i land i have a big jump power. this cant be fixed by saying it needs to become the default because in my game the jump power constantly changes so it would mess up that.
local toggle = false --keep at false
local config = script.Parent:FindFirstChild("Configure") --finds Configure
local thrustlife = config:FindFirstChild("ThrustLifeTime").Value --Finds thrust life time
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if not toggle then
toggle = true --dont touch
local pad = script.Parent
pad.BrickColor = BrickColor.new("Black") --change pad color
pad.Material = ("Plastic") --change material color
local trail = config:FindFirstChild("JumpPadDust"):Clone()
trail.Parent = hit.Parent:FindFirstChild("HumanoidRootPart")
local thrust = Instance.new("BodyThrust")
thrust.Force = Vector3.new(0,0,-2550) --PushForce
----------Animation--------------
--local animation = Instance.new("Animation")
--animation.AnimationId = ("rbxassetid://00")
--animation.Parent = hit.Parent
--local loadedanim = hit.Parent:FindFirstChild("Humanoid"):LoadAnimation(animation)
--loadedanim:Play()
--[Add an animation if you know what you're doing]--
---------------------------------
thrust.Parent = hit.Parent:FindFirstChild("HumanoidRootPart")
hit.Parent:FindFirstChild("Humanoid").JumpPower = config:FindFirstChild("JumpHeight").Value
hit.Parent:FindFirstChild("Humanoid").Jump = true
pad.activate:Play()
game.Debris:AddItem(thrust, thrustlife) --Push force life time
game.Debris:AddItem(trail, 3) --Smoke effect life time
wait(2)
hit.Parent:FindFirstChild("Humanoid").JumpPower = 100 --dont touch
--loadedanim:Stop()
wait(.5)
--animation:Destroy()
toggle = false
end
end
end)