This can be accomplished by using the Vector3.new userdata, and a simple while loop. First we need to define the part, i'll name mine Part, easy. Next i'll define the position of Part by using the Vector3 userdata that I was talking about, What is Vector3? How do I use it? Vector3 is a group of three values, 1st is the x value(width), 2nd is the y value(height), and last is the z value(depth), Now the while loop, What does it do? The while loop continues looping until theobject defined is nil or false. Now lets set-up our script.
while wait() do
local part
part.Position=Vector3.new(partToBegin.Position)+Vector3.new(0,10,0)
wait(TimeHere)
part:remove()
end
- Vector3
new link (Link)
- Loops link (
Link)
12 comments
I already have the part, should I remove the Instance.new line?
Yes, just define the part's location and place a clone method.
:clone()I am a beginner at this. Is it OK if you give me the full script, and explain what I have to fill in, please?
Oh sure!
Thanks
I'm confused what to put in "partToBegin", also, when I put the location: "local game.Workspace.Tycoon.Main.Creator1.Handle:clone()", the dot after "game", is underlined.
Oh, and by the way, I already have a conveyor belt that destroys the part, I just wanted a script that respawned the part so it can keep destroying .
partToBegin places your Part in a certain part's position, then I added 15 studs with it. You have your variable mistaken, should be
local part= --location.Oh Ok thank you
One last thing, I see this is incorrect, what is wrong with it? part.Position = Vector3.new(18.312, 2.778, 49.123.Position)+Vector3.new(0,10,0)
Remove the .Position
Oh thanks, but you didn't tell me about my other comment: "Oh, and by the way, I already have a conveyor belt that destroys the part, I just wanted a script that respawned the part so it can keep destroying ."