Hi there, I hope you have a great day. Ok So I have a working JumpPad script with a Debounce variable that once touched will make the players JumpPower increase to 184 and then it goes back to the original JumpPower (which is 93). It works fine in Roblox Studios(most of the time) but only works like half of the time when I Publish it to Roblox and actually play it on the Roblox App. By the way, the JumpPad itself is CanCollide Off.
JumpPad Code:
local TouchedPart = false --The debounce variable script.Parent.Touched:Connect(function(hit) local hum = hit.Parent:FindFirstChild("Humanoid") if hum then --If it has been found if TouchedPart == false then --Making sure it has not touched the part before TouchedPart = true --So it does not fire another time hum.JumpPower = 184 wait(0.5) hum.JumpPower = 93 TouchedPart = false --"Reconnecting" the event so it runs again end end end)
The Problem is that when I jump on the JumpPad and then jump again, my JumpPower isn't 184 and remains the same. Is this due to Roblox lag or is there something wrong with the script.
What I have tried: Using the TouchEnded function. Turning Can Collide on (which made it worst)