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

Why does my Teleporter Teleport above a part?

Asked by 4 years ago
Edited 4 years ago

So i made two parts, When you touch one off them it Telports you to the other part. Same with the other part. The two parts are inside a building and for some reason they tp up on the roof instead off the 1st floor to 2nd floor. Heres a screenshot (link to screenshot) to understand better:

2 answers

Log in to vote
0
Answered by
tomekcz 174
4 years ago

Hey! to get rid of that problem use CFrame instead of vector3!

Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
PartOne.Touched:Connect(function(Hit)
    if Hit:IsA("Humanoid") then
        local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
        Player.Character:SetPrimaryPartCFrame(X,Y,Z)
    end
end)

It's quite simple, the player touches a part, and it teleports them to a specific Coordinate Frame, this is related to Vector3 but CFrame can supply much more than XYZ, containing the possibility to use Radians and etc.

0
Hmm it dosent seem to work for whatever reason :( 12tytsi 0 — 4y

Answer this question