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

How do I cframe a player in position when they touch a part?

Hey, I was wondering how I'd make it so once a player touches a part the player moves ina position using c frame (e.g. facing forward), how would I do this? :)

2 answers

local player = game.Players.LocalPlayer
local char = player.Character
local where = Vector3.new(0,0,0)

char:MoveTo(where)
--This should move your character for the whole server instead locally.

script.Parent.Touched:Connect(function(hit)

if hit.Parent:FindFirstChild("Humanoid") then

hit.Parent.HumanoidRootPart.CFrame=Vector3.new(0,0,0) --Place your position

end)

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