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

Character not connected to HumanoidRootPart?

Today I was making a script to move the Player onto a spawn plate. However, when I changed the position of the HumanoidRootPart, the character stayed where it spawned!

Here is part of the script:

char.HumanoidRootPart.Position = Vector3.new(coordinates)

Some time ago this still worked and the Character was were the HumanoidRootPart was.

I am using R6 for this project.

Thanks!

2 comments

0

try adding Players.PlayerAdded:connect(function) or something. Im just a beginner so idk if this can help

0

not really

1 answer

✓ Accepted answer

Ok, well I don't have the rest of your script, however, when altering the position of the HumanoidRootPart, you are moving the part and not the model.

In order to move the model, you need to use the CFrame property. The best use of this method for models is the :SetPrimaryPartCFrame() function (since the HumanoidRootPart is the PrimaryPart of the Character model).

char:SetPrimaryPartCFrame(CFrame.new(coordinates))

3 comments

0

Oh yeah I forgot

0

I haven't scripted in a while. Kind of rusty

0

This helped thanks.

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