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
1 year ago

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

  RED.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 — 1y

2 answers

Log in to vote
0
Answered by 1 year ago
Edited 1 year 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

local Part = --Path of Duplicated Part here

-- then after that get the path of part you want to move then put it here ?
local MainPart = --Path of Part you wanna Move Here
-- then use this 
MainPart.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

local Part = --Path of Duplicated Part here

-- then after that get the path of part you want to move then put it here 
local MainPart = --Path of Part you wanna Move Here
-- then use this 

MainPart.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 — 1y
0
THANKS AGAIN! Gigaset39 111 — 1y
Ad
Log in to vote
-1
Answered by 1 year 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.

RED: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 — 1y

Answer this question