Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

For some reason I can not teleport players, any fix?

Asked by 6 years ago
Edited 6 years ago
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.

0
Please post your code in a code block! And Experimental Mode cannot be on, what do you mean it's on? User#19524 175 — 6y
1
it can be on, and it is by default. How do i post in code block? Oxygen4Lyfe 408 — 6y
1
figured out how to put in code block it is in one now Oxygen4Lyfe 408 — 6y
0
Select all of your code and click the blue Lua icon. And Experimental Mode was removed, FE has been forced. User#19524 175 — 6y
View all comments (5 more)
1
no it wasnt i still have the option to have it on and off Oxygen4Lyfe 408 — 6y
0
Currently that setting is a dummy setting, it does nothing. If you do not believe me, read this post: https://devforum.roblox.com/t/removal-of-experimental-mode/152807 User#19524 175 — 6y
1
from the post "All of the classic games that were made unplayable for all users (except friends of the creator) are now open to visit again. Please note: these games may not work properly if they were created in Experimental Mode, but they are once again available to visit." Oxygen4Lyfe 408 — 6y
1
oh wow it actually was removed Oxygen4Lyfe 408 — 6y
0
They were shut down for not having FE. They are back up again, only they are broken. I hope you read this: "As of today, all games on the Roblox platform are now set to Non-Experimental Mode, and all future games will be Non-Experimental Mode by default. Experimental Mode has been entirely discontinued,"... User#19524 175 — 6y

1 answer

Log in to vote
1
Answered by 4 years ago

Nvm this is old

Ad

Answer this question