Hello guys! That is my very first Topic.
I wanna create parkour passing system like in jujutsu shenanigans.
Not wall climbing, but jumping over objects like in video bellow.
I wonder what is easiest and proper way to create it
Your reply helped me
I wrote 2 scripts client’s and server’s
Somehow that works
It looks bad but that is enough for my needs
I will put code lower
Client script (Put in Starter character scripts)
local player=game.Players.LocalPlayer
local char=player.Character or player.CharacterAdded:Wait()
local humanoid=char:WaitForChild("Humanoid")
local VaultEvent=game.ReplicatedStorage["Vault Event"] --Replace with your event
local function findPartInFrontTorso()
local rayParams=RaycastParams.new()
rayParams.FilterType=Enum.RaycastFilterType.Exclude
rayParams.FilterDescendantsInstances = {char}
local origin=char["HumanoidRootPart"].Position
local direction=char["HumanoidRootPart"].CFrame.LookVector
local rayLength=2
local result=game.Workspace:Raycast(origin, direction * rayLength, rayParams)
if result then
VaultEvent:FireServer()
end
return nil
end
while task.wait(0.01)do
findPartInFrontTorso()
end
Server Script (put in ServerScriptService)
local VaultEvent=game:GetService("ReplicatedStorage")["Vault Event"]
VaultEvent.OnServerEvent:Connect(function(player)
local char=player.Character
char.Humanoid.Jump=true
for i=60,0,-15 do
char.HumanoidRootPart.Velocity=char.HumanoidRootPart.Velocity+char.HumanoidRootPart.CFrame.LookVector*((i*i)/16) --You can Play with formula to get different effect
task.wait()
end
end)