Hello Fellow Scripters! So this is what I am trying to make: First, you wait 3 seconds then a part will be cloned at this position; (60, 34, 59), and a message will be printed into the output. After that you will wait 5 seconds and the cloned part will be destroyed. Then, some text will be printed again 4 seconds the part was destroyed. Please correct me if I am incorrect! Thanks!
My Code:
wait(3) local myClone = game.Workspace.Part:Clone() myClone.Position = (60, 34, 59) print(The Part has been cloned.) wait(5) myClone:Destroy() wait(4) print(HAHA That part has been deleted!) --This should work right? --Answer if you the answer to this question.
Question(s): On line 3 when we used a variable to define the cloned part, on line number 10 do we still have to call the part "myClone"???
Please do not forget to answer both questions above.
Correct Answered code a fellow scripter helped with:
wait(3) local myClone = game.Workspace.Part:Clone() myClone.Position = Vector3.new(60, 34, 59) print("The Part has been cloned.") wait(5) myClone:Destroy() wait(4) print("HAHA That part has been deleted!") --This should work right? --Answer if you the answer to this question.
Hello there, yes that is the correct way of doing it. Yes you will need to call the myClone part on line 10. I would also put "" on your prints, Heres the edited script:
wait(3) local myClone = game.Workspace.Part:Clone() myClone.Position = Vector3.new(60, 34, 59) print("The Part has been cloned.") wait(5) myClone:Destroy() wait(4) print("HAHA That part has been deleted!") --This should work right? --Answer if you the answer to this question.