#help me

2 messages · Page 1 of 1 (latest)

rocky fossil
#

local humanoidrootpart = character:FindFirstChild("HumanoidRootPart")
if humanoidrootpart then
humanoidrootpart.CFrame = CFrame.new(Spawn_Location.CFrame.p) + Vector3.new(0,5,0)

brisk hazel
#

You have 3 options, but first you need to get the character:

local char = plr.Character or plr.CharacterAdded:Wait()

Then you can use of 3 options:

  • CFrame; Change the CFrame of the HumanoidRootPart to the CFrame of the part EXITLOCATION;
char:FindFirstChild("HumanoidRootPart").CFrame = CFrame.new(EXITLOCATION.CFrame)
  • SetPrimaryPartCFrame; You would need to get just the model of the character and use this; In between "(", ")" you would need to put the CFrame of the part EXITLOCATION;
char:SetPrimaryPartCFrame(EXITLOCATION.CFrame)
  • Vector3; Set the Vector3 of the HumanoidRootPart to the Vector3 of the part EXITLOCATION;
char:FindFirstChild("HumanoidRootPart").Position = EXITLOCATION.Position

First and second options are the exact same;
By using CFrame, the HumanoidRootPart will rotate as the part EXITLOCATION, if you don't wish that, just use Vector3
Note: You will need to add a little height so the character wont stuck in the ground