So in a brief sense, when the player touches the part, it's supposed to throw the player into the air by 100 studs. This works in Studio no problem but for some reason doesn't want to work in-game. There's no errors which appear in the code to my knowledge and I've even tried this in a LocalScript as well. Thanks for any help in advance!
local sound = script.Parent.Parent.Sound
local debounce = false
function onTouched(part)
if debounce == true then return end
if part.Parent ~= nil then
local h = part.Parent:findFirstChild("Humanoid")
sound:Play()
h.Parent.HumanoidRootPart.Velocity=Vector3.new(0,100,0)
wait(1)
debounce = false
end
end
script.Parent.Touched:connect(onTouched)
