I want to allow Players to walk on the ramp. But they falldown if they stop walking. My Script is not working. I don't know why.
Here is my code:
local char = game:GetService("Players").LocalPlayer.Character or game:GetService("Players").LocalPlayer.CharacterAdded:Wait() local lowerTorso, rootPart = char:WaitForChild("LowerTorso"), char:WaitForChild("HumanoidRootPart") local params = RaycastParams.new() params.FilterDescendantsInstances = {char} params.FilterType = Enum.RaycastFilterType.Blacklist game:GetService("RunService").Heartbeat:Connect(function() local ray = workspace:Raycast(rootPart.Position, Vector3.new(0, -char.Humanoid.HipHeight - 2, 0), params) if ray then local vector = rootPart.CFrame:VectorToObjectSpace(ray.Normal) lowerTorso.Root.C0 = CFrame.new(0,-1,0,1,0,0,0,1,0,0,0,1) * CFrame.Angles(vector.z, 0, -vector.x) end end)