#!NEED HELP! CART RIDE GAME HELP NEEDED

1 messages · Page 1 of 1 (latest)

winter aurora
#

I HAVE TRIED SO MANY SCRIPTS AND NOTHING WORKS

sudden spire
#

Firstly be sure to place your script inside your cartModel, CartModel -> despawnScript

#

idk what folder you were putting in but it to double check đź’€

#

Check when this Property changes by listening to the Property Changed event and every time it happens you reset the timer and check wether or not the CartSeat.Occupant is true or nil

winter aurora
#

alr im new so i might need further help srry.

winter aurora
#

i need a script cuz none of the scripts i have dont work

sudden spire
#

But I’ll write a small fix ig

#
local cartModel = script.Parent
local seat = cartModel:WaitForChild(“CartSeat”)
local despawnTime = 10 
local down = false

local function checkForOccupant()
    If seat.Occupant == nil and not down then
        down = true
        local timer = 0
        while timer < drape time do
            task.wait(1)
            if seat.Occupant ~= nil then
            down = false — the player went back into the seat
           End
           timer += 1
      End
     CartModel:Destroy()

….. blah blah blah


seat:GetPropertyChangedSignal(“Occupant”):Connect(function()
   task.wait(0.1)
   ChackForOccupants()
End
#

Take it more of an example