local button = script.Parent local didLandYet = false button.MouseButton1Click:Connect(function() local player = script.Parent.Parent.Parent.Parent local humanoid = player.Character.Humanoid local escapePod = game.ReplicatedStorage.EscapePod:Clone() local stopper = game.Workspace.Stopper humanoid.CameraOffset = Vector3.new(-10, 3, -10) escapePod.Parent = game.Workspace escapePod.Name = player.Name.."EscapePod" local seat = escapePod.Seat seat:Sit(humanoid) script.Parent.Parent.Enabled = false wait(5) stopper.CanCollide = false wait(5) stopper.CanCollide = true wait(9) didLandYet = true end) local Humanoid = script.Parent.Parent.Parent.Parent.Character.Humanoid local canAct = true Humanoid.Changed:Connect(function() local EscapePod = game.Workspace:WaitForChild(script.Parent.Parent.Parent.Parent.Name.."EscapePod", 5) if EscapePod == nil then elseif Humanoid.Jump == true and didLandYet == true and canAct == true then canAct = false didLandYet = nil local humanoidRootPart = script.Parent.Parent.Parent.Parent.Character.HumanoidRootPart local X = humanoidRootPart.Position.x local Y = humanoidRootPart.Position.y + 15 local Z = humanoidRootPart.Position.Z humanoidRootPart.CFrame = CFrame.new(Vector3.new(X, Y, Z)) Humanoid.CameraOffset = Vector3.new(0, 0, 0) print("humanoid ejected") wait(0.1) canAct = true elseif Humanoid.Jump == true and didLandYet == false and canAct == true then canAct = false EscapePod.Seat:Sit(Humanoid) print("humanoid sat down forcefully") wait(0.1) canAct = true end end)
My code is all in one script and experimental mode is on. I get no errors and this is very annoying, Everything else is working besides the part of the script that changed the CFrame of the humanoid root part to be its current X co-ordinate, Y co-ordinate + 15, and Z co-ordinate.