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

Why will this wall script not work (using Vector3) ?

Asked by
chafava -113
4 years ago
pos = namegen.Position

I set the position to a local parts position and used a remote event to remake the part as a server part, but this is the problem:

part.Position = Vector3.new(pos) -- Fix this part

This is the problem, I set this is a position and I am moving it with Vector3, and? Nothing happens, wow (position is just 0,0,0) !

So I tried everything including different methods of CFrame but, still nothing!!!

So you what, how do I fix this.

(if you want to try talking on disc about problem well oof im not gonna on until like tomorrow at like 4pm bst so if you want that then wait)

0
namegen.Position is a Vector3 datatype. Vector3.new takes 3 arguments which are numbers, not a Vector3. I think what you're trying to do is part.Position = pos. Be careful pidgey 548 — 4y
0
Did you try pos = namegen.CFrame // part.CFrame = pos? KDarren12 705 — 4y
0
Vector3 will try to get 3 numbers separated by comma, like Vector3.new(X,Y,Z). Hence, only having one variable"pos" wont work. Yuuwa0519 197 — 4y

1 answer

Log in to vote
2
Answered by
DanzLua 2879 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

The reason why the part you proved errors is because Vector3.new() take three numbers.

You are providing it with a Vector3 value.

To fix this simply feed it the pos value

part.Position = pos
Ad

Answer this question