Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how to put a object in the middle of the player?

Asked by 2 years ago

Hello! I have a object that I want to put in the middle of the player. So the torso (im using R6) and im trying to do that but it's not working and I cant figure out why. I have this in StarterCharacterScripts as a ServerScript

Heres what I tried

local leftside = script.Parent.Middle.LeftSide
local rightside = script.Parent.Middle.RightSide

leftpartar = {
    leftside.LeftPart,
    leftside.LeftPart,
    leftside.LeftPart,
    leftside.LeftPart,
    leftside.LeftPart,
    leftside.LeftPart,
    leftside.LeftPart,
    leftside.LeftPart
}
rightpartar = {
    rightside.RightPart,
    rightside.RightPart,
    rightside.RightPart,
    rightside.RightPart,
    rightside.RightPart,
    rightside.RightPart,
    rightside.RightPart,
    rightside.RightPart
}

wait(2)
for i, v in pairs(leftpartar) do
    print("left")
    v.Position = script.Parent.Torso.Position
end

for i, v in pairs(rightpartar) do
    print("right")
    v.Position = script.Parent.Torso.Position
end

local dathing = script.Parent.Middle
dathing.Parent = script.Parent.Torso

And its not going into the middle of the player. Any help would be appreciated.

Answer this question