(only first 8 lines)
c = game.Players:GetChildren()
x,y,z = script.TargetPosition.Value.X ,script.TargetPosition.Value.Y, script.TargetPosition.Value.Z
while wait() do
for i = 1, #c do
local points = ``game.ReplicatedStorage.RemoteFunction:InvokeServer(c[i].Character.Torso.Position)
x,y,z = points.X, points.Y, points.Z
it doesn't change the value
To make a Vector3
from three coordinates, you use Vector3.new(x, y, z)
.
For example,
Brick.Position = Vector3.new( vec.X, vec.Y, vec.Z )
However this is redundant. There's no need to construct a value when you already have one:
Brick.Position = vec
Rarely is it that you will need to deconstruct a Vector3
into its coordinates; it's just unnecessary. Using it as a single Vector3
is less typing, faster, and easier.
I don't really understand what it is you are trying to do here, so I can't give any more specific advice.
I also see you are using a remote function you've just named RemoteFunction
. That's a useless name -- it should describe what it does so that your code is more explanatory and descriptive.