I’m trying to make a script that teleports all players on a specific team to a different location for each of them. This works, however it makes them face the wrong way when they are teleported. Could I have some help with changing up this script so it makes the player face the register rather than to the right? Thanks!
Script:
local Teams = game:GetService("Teams")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remotes = ReplicatedStorage.Remotes
local spawns = workspace.TeleportParts
remotes.TeleportAllInterviewees.OnServerEvent:Connect(function(player)
--if player.Team ~= Teams.Interviewer then
-- return
--end
for spawnIndex, interviewee in ipairs(Teams.Interviewee:GetPlayers()) do
if not interviewee.Character then
continue
end
interviewee.Character.HumanoidRootPart.CFrame = spawns[tostring(spawnIndex)].CFrame * CFrame.new(0, 2, 0)
end
end)
You could just make the teleport brick or whatever facing the way you want the person to face. That would be the easiest in my opinion then making another line of code.
Roblox removed the stud facing or whatever its called. It basically allowed you to change the stud type and see the direction of the part. Luckily, someone made a plugin to allow you to see the directions of a part. Finale of Part Surface Changes: No More Hinges - #82 by tukars