I’ve made a reply on something like this and here it is:
I hope it helps.
P.S- When checking for the seat.Occupant that’s when you’re checking if the player sat down and for the else, that’s when the player got up. Sorry if I didn’t explain it fully, I’m currently in a rush.
Alright so the detection for seats works perfectly but I can’t figure out the whole teleport thing. (Sorry I’m such an idiot lol)
Seat:GetPropertyChangedSignal("Occupant"):Connect(function()
if (Seat.Occupant) then
humanoid = Seat.Occupant
print("Entered seat")
else
wait()
local exit = script.Parent.Parent.Body.FrontLeft
print("Exited seat")
humanoid.Parent.HumanoidRootPart.CFrame = CFrame.new(exit.Position)
end
end)
When I attempt to teleport to said part, all my avatar does is simply jump out and not teleport. No errors pop up in the output. Any idea what to do here?
All of these are good answers but I’m trying to get my avatar to teleport when the game detects that it jumps out (and the game does detect it now). When I tried to use CFrame to teleport, my character simply jumps out and doesn’t teleport over to the desired location.