Balloon script BUGGING SO HARD

This script is so buggy but i cant find way, everything looks good, theres nothing wrong but its still SO BUGGY I changed the wait(0.3) into wait(0.1), seems to work but then it bugged again, I had to change the balloon to can collide = true but 1. making the ballons can collide true WON’T HELP because lag sometimes makes you touch the balloon twice

local bouncePad = script.Parent
local db = false

bouncePad.Touched:Connect(function(touch)
	
	
	local char = touch.Parent
	
	
	if game.Players:GetPlayerFromCharacter(char) and char:FindFirstChild("HumanoidRootPart") and not char:FindFirstChild("HumanoidRootPart"):FindFirstChild("BodyVelocity") then
		
		
		local bodyVelocity = Instance.new("BodyVelocity")
		
		
		bodyVelocity.Velocity = Vector3.new(0, 75, 0)
		bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
		bodyVelocity.P = math.huge
		
		bodyVelocity.Parent = char.HumanoidRootPart
		
		wait(0.1)
		
		
		bodyVelocity:Destroy()		
	end
end)

What exactly is the “bug” you are experiencing? I might have a few ideas on what to do but I need to know the exact issue first.

2 Likes

Maybe try something like this?

local bouncePad = script.Parent
local db = false

bouncePad.Touched:Connect(function(touch)
	if db == false then
		db = true
		local char = touch.Parent
		if game.Players:GetPlayerFromCharacter(char) and char:FindFirstChild("HumanoidRootPart") and not char:FindFirstChild("HumanoidRootPart"):FindFirstChild("BodyVelocity") then
			local bodyVelocity = Instance.new("BodyVelocity")
			bodyVelocity.Velocity = Vector3.new(0, 75, 0)
			bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
			bodyVelocity.P = math.huge
			bodyVelocity.Parent = char.HumanoidRootPart
			wait(0.1)
			bodyVelocity:Destroy()		
		end
		db = false
	end
end)

Again I will need to know the exact issue you are talking about with a video or something to help any further.

1 Like

There seems nothing wrong with your script.
Tried the script and got an expected result.

Your character will be forced mid air every 0.1 second when you touch the bounce pad.