Hey, I have this script that makes a few jets spawn and fly above your head and then despawn. However, I have an issue. I need to reset the position of the model so the command can be reused. I tried copying and editing the while loop part so it would reverse the whole thing but it ended up too far from its actual original position. Can't destroy the model and clone it back again as that would give me the parent property is locked error. Anyone know how to?
local model = game:GetService("ServerStorage").Flight
local copy = model:Clone()
game:GetService("Players").PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
if string.lower(msg) == "/e flight" then
copy.Parent = workspace
script.Value.Value = true
wait()
while script.Value.Value == true do
for i = 1,100 do
wait()
copy:SetPrimaryPartCFrame(CFrame.new(copy.PrimaryPart.Position + Vector3.new(0,0,-20)))
end
end
copy.Parent = game:GetService("ServerStorage")
end
end)
end)

2 comments
Cloning it in the command is a good idea, I have no clue why didn't I think of that before, I'm gonna try.
Yep it worked. Thanks.