Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would the CFrames be able to get me to a fixed position?

How would I get this script to teleport me to a specific position? player.Character.HumanoidRootPart.CFrame = target.CFrame * CFrame.new(0, 3, 0)

So I recently got into cframes and I don't know how this works, whether it teleports me up or down or whatever.

1 answer

Without knowing where exactly you need the character moved to, I can't really tell you anything other than that your CFrame operation is fine. However, to move the character with CFrames, you should use :SetPrimaryPartCFrame() on the character model. For example:

local Players = game:GetService("Players")
local target = workspace.Target

Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        character:SetPrimaryPartCFrame(target.CFrame * CFrame.new(0, 3, 0))
    end)
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.