-- SERVER SCRIPT INSIDE FALLBOARD
---> variables
local FallEvent = game.ReplicatedStorage.Remote.FallEvent
local MainPart = script.Parent.Main
local PadPart = script.Parent.Pad
local debounce = false
---> main
MainPart.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if not debounce then
debounce = true
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
FallEvent:FireClient(plr)
task.wait(0.5)
hit.Parent.HumanoidRootPart.CFrame = PadPart.CFrame + Vector3.new(0,10,0)
task.wait(1)
debounce = false
end
end
end
end)
You can put different types of arguments, for example two of the arguments is to put two Vector3s. The first Vector3 will be the HumanoidRootPart position and the second Vector3 will be the direction the HumanoidRootPart is looking at.
You can modify those Vectors so the HumanoidRootPart doesn’t tilt.
Using Pad.CFrame.LookVector (that will get the normalised vector your part is facing) but that will make your character literally face to this position, making it tilt. So add it to the character HumanoidRootPart’s position and use that as a direction.
You’re not using the CFrame correctly. You should use CFrame.new and assign it with the HumanoidRootPart’s position and the HumanoidRootPart’s position plus the LookVector.