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

CFrame is not a valid member of Model? help plzz

Asked by 7 years ago

i want to teleport the player to Target but it is saying CFrame is not a valid member of model i worked but suddenly it did not work anymore can you help me

function TeleportPlayers(target)
    for _, player in pairs(game.Players:GetChildren()) do
        local charecter = player.character
        local torso = charecter:WaitForChild("UpperTorso")
        torso.CFrame = target.CFrame
    end
end

1 answer

Log in to vote
0
Answered by 7 years ago

Explanation

Let me break that error up for you.

Basically, it's saying that in roblox, models do not have the property 'CFrame'

There is nothing actually wrong with the code you sent us, it is that the code is being used incorrectly.

Solution

You should teleport the player to a part, not a model

TeleportPlayers(Model.TeleportPart)
0
thx for the answer it was me that was dumb i in an earlier when i made a local i did not write to the part it needed to go to criller7070 6 — 7y
Ad

Answer this question