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? :)
CFrame can be used to rotate as well as move an object. You can try something like this:
local Part = workspace.Part local Players = game:GetService('Players') Part.Touched:Connect(function(otherPart) local Player = Players:GetPlayerFromCharacter(otherPart.Parent) -- use service to get player if Player then -- check if player local Character = Player.Character or Player.CharacterAdded:Wait() -- get character Character.HumanoidRootPart = CFrame = Character.HumanoidRootPart.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) end end)
Use the math.rad() to rotate the player accordingly, while still keeping the Player's position.