fgfbfrj
(HowBizzare)
#1
idk why my script isn;t working
-
What is the issue? Include screenshots / videos if possible!
how to get rid of this error?
local n = 5
for number = 1,n do
print(number,game.Workspace.Part.Position)
local NewPart = Instance.new("Part")
NewPart.Parent = game.Workspace
end
Rae3504
(Rae3504)
#2
On the first iteration of the loop, a part doesn’t yet exist
Instead do:
local n = 5
for number = 1,n do
local NewPart = Instance.new("Part")
NewPart.Parent = game.Workspace
print(number, NewPart.Position)
end
4 Likes