I successfully got the function to work, but the position of the part will not change after waiting 3 seconds. Can you help me?
01 function myPart(myPosition) 02 local part = Instance.new("Part") 03 part.Anchored = true 04 part.BrickColor = BrickColor.new("Black") 05 part.Position = myPosition 06 part.Parent = workspace 07 08 return myPart 09 end 10 11 local myPartData = myPart(Vector3.new(2,7,1)) 12 wait(3) 13 myPartData.Position = Vector3.new(2,7,2)
You're indexing the function, not the part itself. Change line 8 to "return part".
Closed as Non-Descriptive by hiimgoodpack, NotFrindow, and User#5423
This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.
Why was this question closed?