Hey, i’m trying to set the player’s root CFrame to a part’s, and the position of the rootpart changes, but not the rotation. Am i doing something wrong?
local function spawnAtPart(part)
for _, player in ipairs(Players:GetPlayers()) do
local character = player.Character or player.CharacterAdded:Wait()
character:PivotTo(part.CFrame)
end
end
Edit Pivot gives you visually same interaction model as Rotation, but it changes Parts pivot not the Rotation, my question is do you actually see the part being rotated
changed it to this, same problem and nothing changed
local function spawnAtPart(part)
for _, player in ipairs(Players:GetPlayers()) do
local character = player.Character or player.CharacterAdded:Wait()
local hrp = character:FindFirstChild("HumanoidRootPart")
if hrp and part then
hrp.CFrame = part.CFrame
end
end
end
local Players = game:GetService("Players")
local function spawnAtPart(part)
for _, player in ipairs(Players:GetPlayers()) do
local character = player.Character or player.CharacterAdded:Wait()
character:PivotTo(part.CFrame)
end
end
Players.PlayerAdded:Connect(function(plater)
plater.CharacterAdded:Connect(function()
spawnAtPart(workspace.Part)
end)
end)