I am outright crying at this script

Im honestly getting super tired of this so im going to explain this as much as i can.

BAASICALLY

  1. We wanted to make a balloon bounce pad which has a cooldown, we originally had two scripts for this, one for the balloon popping and doing the sound, and the other launching the player, we got it done, but its SUPER BUGGY
  2. the bug is basically you can pass through the balloon without jumping, and we wanted a type of it so it changes your jump power and makes you automatically jump when you touch the balloon instead of using whatever we’re using
  3. I tried using the JTOH KIT for this, it has a jump pad, problem is, it is completely incombatilblle using this, WE HAVE TWO SCRIPTS we tried to inject into this.

1- ClientObjectScript paired with a NumberValue of “Power”, Our way was to make a script to change the value power of “50” to “0” when the cooldown is on. Didn’t work.

2- Simple Velocity script for the part, didn’t work for some reason.

here was the clientobjectscript:

return function()
	local db = true
	local players = not script.Parent:FindFirstChild("IgnorePlayers")
	local boxes = not script.Parent:FindFirstChild("IgnoreBoxes")
	script.Parent.Touched:Connect(function(hit)
		if hit.Anchored == false and db == true and ((players and hit.Parent:FindFirstChild("Humanoid")) or (boxes and hit.Name == "Pushbox")) and not (script.Parent:FindFirstChild("Activated") and not script.Parent.Activated.Value) then
			db = false
			spawn(function()
				wait(0.05)
				db = true
			end)
			local bv = Instance.new("BodyVelocity")
			bv.MaxForce = Vector3.new(0, math.huge, 0)
			bv.Velocity = Vector3.new(0, script.Parent.Power.Value, 0)
			bv.Parent = hit
			game:GetService("Debris"):AddItem(bv,0.15)
		end
	end)
end

and heres the simple script:

script.Parent.Velocity = script.Parent.CFrame.UpVector * 900
script:Remove()

I tired so hard pairing all of these but it JUST DOESN’T WORK!

WHAT I WANT WORKING

  • Jump script without moving the body (The body automatically bouncing by itself like a trampoline.
  • Pairs with the other script of, cooldown functionality, balloon .touched and other stuff.
  • Literally just works

The first script

----- | Services | -----
local Players = game:GetService("Players")


----- | Variables | -----
WaitTime = 2
Debounce = false


----- | Method | -----
function onTouch(part)
		local Human = part.Parent:FindFirstChild("Humanoid")
		
		if Debounce then return end

		if Human then
			local Player = Players:GetPlayerFromCharacter(Human.Parent)
			
			Debounce = true
			script.Parent.Music:Play()
			script.Parent.Day.Enabled = true
			script.Parent.Transparency = 1

			task.wait(0.50)
		script.Parent.Day.Enabled = false
		script.Parent.JumpPad.Power.Value = 0
		script.Disabled = true

			task.wait(WaitTime)
		script.Parent.Parent.Transparency = 0
		script.Parent.JumpPad.Power.Value = 50
			script.Disabled = false	

			Debounce = false
		end
end


----- | Callback | -----
script.Parent.Touched:Connect(onTouch)

The script im trying to pair rn

return function()
	local db = true
	local players = not script.Parent:FindFirstChild("IgnorePlayers")
	local boxes = not script.Parent:FindFirstChild("IgnoreBoxes")
	script.Parent.Touched:Connect(function(hit)
		if hit.Anchored == false and db == true and ((players and hit.Parent:FindFirstChild("Humanoid")) or (boxes and hit.Name == "Pushbox")) and not (script.Parent:FindFirstChild("Activated") and not script.Parent.Activated.Value) then
			db = false
			spawn(function()
				wait(0.05)
				db = true
			end)
			local bv = Instance.new("BodyVelocity")
			bv.MaxForce = Vector3.new(0, math.huge, 0)
			bv.Velocity = Vector3.new(0, script.Parent.Power.Value, 0)
			bv.Parent = hit
			game:GetService("Debris"):AddItem(bv,0.15)
		end
	end)
end

image
image