local Brick = Instance.new("Part")
Brick.Parent = game.Workspace
while true do
Brick.Position.X = game.Workspace.Player.Torso.X
Brick.Position.Y = game.Workspace.Player.Torso.Y
Brick.Position.Z = game.Workspace.Player.Torso.Z
COMMUNITY QUESTION
It says X is not a valid member of part? Please help.
1 answer
You cannot edit values of Position. You can just edit Position itself.
And you forgot to say thatTorso.Position.Xand not Torso.X
local Brick = Instance.new("Part")
Brick.Parent = game.Workspace
while true do
Brick.Position = game.Workspace.Player.Torso.Position -- you forgot to say Position. X = X, Y = Y, Z = Z
As spongocard said, it wont work if you dont put an endand an wait():
local Brick = Instance.new("Part")
Brick.Parent = game.Workspace
while true do
Brick.Position = game.Workspace.Player.Torso.Position -- you forgot to say Position. X = X, Y = Y, Z = Z
wait()
end
4 comments
0
YAY thanks everybody
0
if helped please accept the answer. thanks
2
Firstly, you need an end in your code for the while loop. Second, you need a wait in your while loop, otherwise it will crash.
0
it passed to me. i will change that
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Unless X, Y and Z are instances, it would be Torso.Position.X instead of Torso.X
oh thank you!!