#Please give me a script to make the car disappear after 10 seconds after the player gets out of the
14 messages · Page 1 of 1 (latest)
#💵︱hiring
I'm new to this and not sure, but can I just put up the script I made?
local car = script.Parent -- The car model
local seat = car:FindFirstChild("Seat") -- The seat in the car
local timer = 10 -- Time in seconds before the car disappears
-- Function to check when the player leaves the seat
local function onPlayerExit()
wait(timer) -- Wait for 10 seconds after the player exits
car:Destroy() -- Remove the car from the game
end
-- Detect when the player leaves the seat
if seat then
seat:GetPropertyChangedSignal("Occupant"):Connect(function()
if seat.Occupant == nil then
onPlayerExit()
end
end)
end
This was made with chatGPT. With this script, when you enter the server, the car is buried in the ground.
and that's why we have to ask twice...
I didn't know, so I used GTP.😔
its fine to use ai, but don't be claiming it as your own code or that you wrote it when you didn't. it comes up a lot. people do the same thing with code they take from tutorials and say they wrote it. not that you were asked in this case, you volunteered that information, but it is very annoying having to ask people twice if they wrote the code themselves and having to ask a second time to clarify if they actually wrote it or if they got it from somewhere else. this is why we have to ask twice.
and yes it does matter because it tells people what your abilities are to then know what kind of help you need
I'm sorry. I did not mean to claim that I made it. It may be an excuse, but I'm using a translation, so there may have been a mistake. I am sorry.
I can't script.
All of these scripts were created by chatGPT, not me.
pass through the seat to the onPlayerExit function and then after the timer check if the seat is still nil before destroying it
thank you