wait(3)
debounce = false
Water= game.Workspace.Ocean2
Char = script.Parent.Parent
function onTouch()
if debounce == false then
Foam = Instance.new("Part")
Foam.Parent = Char.Character.Torso
Foam.BrickColor = BrickColor.new("Mid gray")
Foam.CFrame = CFrame.new(Char.Character.Torso.Position)
Foam.Anchored = true
Foam.CanCollide = false
Foam.BottomSurface = "Smooth"
Foam.TopSurface = "Smooth"
Foam.Transparency = 0.35
Foam.Size = Vector3.new(6,1,6)
script.Parent.Script.Sound:Play()
wait(1.3)
debounce = true
end
end
Water.Touched:connect(onTouch)
ugh I Tried everything but everytime I Press space when im touching part represented as an ocean I wont swim up If this isn't fixed I can't make a game.

2 comments
Please use the code block format in the text editor. It looks like a little Lua logo. To edit your question, hit the "Edit" button under your avatar on the right side of this question.
Maybe it's because there's nothing in the script that would make you "go up"? All you're doing is creating a part..