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

i set the position of a part, but it dont goes there. why?

Asked by
Gigaset39 111
2 years ago

i use this script to set the position of RED part:

1RED.Position = Vector3.new( -20.35, 20.51, 4.909)

but.. on roblox studio, the position is this, but when i try the game(in roblox studio) and the 2nd round starts( so this script fires) the RED part goes to another position.. why??

0
is the script a local script? T3_MasterGamer 2189 — 2y

2 answers

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

Hmm, This is a strange bug. But I have some possible answers that may help

Answer 1 Use CFrame to move the part

If you dont understand CFrame, or you dont know how to use it there some Tutorials that may Help you. http://www.youtube.com/watch?v=9YqN8_VERps

Answer 2 Duplicate a part then position it anywhere and make it Transparency 1, then get the path of the duplicated part then put it here

1local Part = --Path of Duplicated Part here
2 
3-- then after that get the path of part you want to move then put it here ?
4local MainPart = --Path of Part you wanna Move Here
5-- then use this
6MainPart.CFrame = Part.CFrame

Answer 3 (Basically same as Answer 2 But using Position) Duplicate a part then position it anywhere and make it Transparency 1, then get the path of the duplicated part then put it here

1local Part = --Path of Duplicated Part here
2 
3-- then after that get the path of part you want to move then put it here
4local MainPart = --Path of Part you wanna Move Here
5-- then use this
6 
7MainPart.Position = Part.Position

That's all I can think of a possible answer, hope this helped

0
thanks, i used : local RedCFrame = workspace.Green.RedPart local primaryPart = workspace.Green.RedPart.MainRed RedCFrame:SetPrimaryPartCFrame(primaryPart.CFrame ) wait(0.001) Gigaset39 111 — 2y
0
THANKS AGAIN! Gigaset39 111 — 2y
Ad
Log in to vote
-1
Answered by 2 years ago

I believe you need to use MoveTo() Maybe something like this will work?? If this doesn't work there are a few things you can change to see if it will work.

1RED:MoveTo(-20.35, 20.51, 4.909.Position)

Let me know if it doesn't work. Hope this helps!!

0
Umm only Humanoids have that, parts don't... T3_MasterGamer 2189 — 2y

Answer this question