I am trying to make a model located in Replicated Storage spawn in the position of the brick called NukeFires But it says That the model does not have a position. How can i do fix this?
here is the script:
local n = game.ReplicatedStorage.FatMan:Clone()
n.Position = workspace.NukeFires.Position
The model itself, doesnāt have a property named as āPositionā, for this, youāll need to set a PrimaryPart in the model then use a function called SetPrimaryPartCFrame(), then include the CFrame of the part you want the model to be teleported to inside between the brackets.
I would place a part inside the model and set the primary part of the model equal to that part. Then you can change the modelās position by referencing that primary part.
Please do not copy my code, this is just an example.
First, go to our model and look at its properties, then click the empty area of the PrimaryPart, then select any part thatās close to the middle of the model by left clicking while your cursor icon is like a part shape.
local PrimePart = game.ReplicatedStorage.FatMan.PrimePart
local n = game.ReplicatedStorage.FatMan:Clone():SetPrimaryPartCFrame(PrimePart.CFrame)
n.Position = workspace.NukeFires.Position