Hello everyone.
So i am making a 3D Platformer, and i have made a Triple Jump script and i have added the HighPerformanceWater script from this model :
https://create.roblox.com/marketplace/asset/11274201168/HighPerformanceWater.
When i test the game, the water works completely fine, but when i jump either inside or outside of the water, the jump completely breaks and my character does something similiar to a moon jump. I will include a video. The scripts of the HighPerformanceWater can be found in the model.
Triple Jump Script:
--//Variables//--
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Root = Character:WaitForChild("HumanoidRootPart")
local Jump1 = script:WaitForChild("Jump 1")
local Jump2 = script:WaitForChild("Jump 2")
local Jump3 = script:WaitForChild("Jump 3")
local JumpAnim1 = Humanoid:LoadAnimation(Jump1)
local JumpAnim2 = Humanoid:LoadAnimation(Jump2)
local JumpAnim3 = Humanoid:LoadAnimation(Jump3)
local Step = Root:WaitForChild("StepTJ", 30)
local Whoosh = Root:WaitForChild("WhooshTJ", 30)
----------------------------------------------------
Jump = 0
isJumping = false
isFalling = false
JumpAnim1.Priority = Enum.AnimationPriority.Action3
JumpAnim2.Priority = Enum.AnimationPriority.Action3
JumpAnim3.Priority = Enum.AnimationPriority.Action3
-------------------------------------------------------
--//Functions//--
function onJump(Val)
isJumping = Val
if isJumping and Jump > 1 and Jump < 3 then
Jump = 3
JumpAnim3:Play()
JumpAnim3:AdjustSpeed(1.75)
Step:Play()
Whoosh:Play()
Root.Velocity = Root.Velocity + Vector3.new(0, 95, 0)
task.wait(0.2)
Whoosh:Play()
task.wait(0.35)
Whoosh:Play()
Jump = 0
elseif isJumping and Jump > 0 and Jump < 2 then
Jump = 2
JumpAnim2:Play()
JumpAnim2:AdjustSpeed(0.5)
Step:Play()
Root.Velocity = Root.Velocity + Vector3.new(0, 75, 0)
elseif isJumping and Jump < 1 then
Jump = 1
JumpAnim1:Play()
JumpAnim1:AdjustSpeed(0.75)
Step:Play()
end
end
---------------------------------------------
function onFall(Val)
isFalling = Val
if not Val then
task.wait(0.25)
if Jump > 0 and not isFalling then
Jump = 0
end
end
end
--//Connections//--
Humanoid.Jumping:Connect(onJump)
Humanoid.FreeFalling:Connect(onFall)