-- To make this work, simply group it with the model you want!



local modelbackup = script.Parent.Parent:FindFirstChild(modelname):clone()
local trigger = script.Parent

enabled = true

function onClick(player)

	if enabled == true then

		enabled = false
		trigger.BrickColor = BrickColor.new("Really black")
		script.Parent.BillboardGui.Enabled = false
		script.Parent.bing:Play()


	if script.Parent.Parent:FindFirstChild(modelname) ~= nil then

		script.Parent.Parent:FindFirstChild(modelname):Destroy()

	end

		local modelclone = modelbackup:clone()
		modelclone.Parent = script.Parent.Parent
		modelclone:MakeJoints()
		player.Character.Torso.CFrame = CFrame.new(modelclone.seat.Position) * CFrame.new(0, 0.5, 0) 
		modelclone.seat.sitsound:Play()
		wait(1)
		modelclone.seat.Anchored = false

		wait(WaitTime)
		script.Parent.BillboardGui.Enabled = true		
		enabled = true
		trigger.BrickColor = BrickColor.new("Bright violet")

	end

end

script.Parent.ClickDetector.MouseClick:connect(onClick)

