I made a script that waits a random time between .5 and 3 seconds then clones a model. My problem is my script clones the model (I already set the primary part) but it does not change CFrame and only clones once. Anyway to fix this? Thanks. (There are parts in the workspace named G#Number)
while wait(math.random(.5,3)) do
local Wrecker = game.ServerStorage.Wrecking:Clone()
Wrecker.Parent = workspace
Wrecker:SetPrimaryPartCFrame(Wrecker.PrimaryPart.CFrame * CFrame.new(math.random(workspace.G1.CFrame.X, workspace.G2.CFrame.X, workspace.G3.CFrame.X, workspace.G4.CFrame.X, workspace.G5.CFrame.X, workspace.G6.CFrame.X,workspace.G7.CFrame.X, workspace.G8.CFrame.X),0,0))
end
Its a default script in the ServerScriptService

1 comment
Nice answer but since it is already answered I can't accept thanks anyway.