Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make auto boat removal?

Asked by 5 years ago

I have simple code that removes a boat if you board and exit:

script.Parent.ChildRemoved: connect (function () - this is a trigger which is essentialy checking to see if you jump from the seat 
wait (10) —this line tells the code to wait 10 seconds
script.Parent.Parent: remove () —this line deletes the car 
end)

But I would like the script to work immediately after the spawn of the boat (that is, immediately after the spawn of the boat, it is deleted after 10 seconds). Also, if you catch a boat, the timer (for 10 seconds in the script) stops, deletion does not occur, and when leaving the boat the timer starts from the beginning.

Please help, I don’t understand the code...

0
You should learn how to code before you start making games. SCP774 191 — 5y
0
boat:Destroy() -- rekt bhqpping 80 — 5y
0
This is whole wrong... I suggest you read up on more learning resources before you try to make a game. Optikk 499 — 5y
0
You're supposed to have -- not just - ISkyLordDoge 37 — 5y
View all comments (2 more)
0
well use for loops robloxsario 76 — 5y
0
I already created the game without knowledge of scripts. LioshaPlay 66 — 5y

Answer this question