1 | player = script.Parent.Parent |
2 | fix = script.Parent:clone() |
3 | while true do |
4 | wait( 40 ) |
5 | script.Parent:remove() |
6 | fix.Parent = player |
7 | end |
From what you've given us and what I've been able to understand,
Considering is one script.
Whats happening:
1 | player = script.Parent.Parent --script.parent.parent is player |
2 | fix = script.Parent:clone() --script.Parent was cloned |
3 | while true do -- you started a loop |
4 | wait( 40 ) --waited 40 seconds |
5 | script.Parent:remove() -- removed the scripts parent. |
6 | fix.Parent = player -- tried to put the clone into script.parent.parent |
7 | end -- ended |
When you remove the scripts parent, you remove the script and it is unable to continue after that. So, did this error, or not do what you expected?