I have a script that has a Touched event. The variable, speedPad, is listening to the touched event. I used an array called touchedSpeedPad to store all the character's names that have touched the speedPad. This made the SpeedPad more responsive, however, this doesn't prevent the lag occurring. Is there any way to hide and/or stop this lag from happening to the players.
Edit: Plus, the character's parts have no TouchInterest in them
local speedPad = script.Parent local duration = jumpPad:WaitForChild("Duration") local speed = jumpPad:WaitForChild("Speed") local touchedSpeedPad = {} local function onTouched(hit) local humanoid = hit.Parent:FindFirstChild("Humanoid") if humanoid then local char = hit.Parent if touchedSpeedPad[char.Name] then return end touchedSpeedPad[char.Name] = true humanoid.WalkSpeed = speed.Value wait(duration.Value) humanoid.WalkSpeed = 20 touchedJumpPad[char.Name] = nil end end jumpPad.Touched:Connect(onTouched)
Well you don't have any wait() in the Script so it should run the Script instantly it might be just a problem with the Studio trying to run the Script a slight delay between the character touching the pad and then the script noticing it's been touched.