So I've been working on this for two straight days and have still yet to figure it out. I've tried multiple codes, they all have failed and have tried others code too. They failed also. I want the players tool to be taken away only when he jumps out of the seat and not the first time he sits in it.
local DeBounce = true
local function takeWeapon(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
print(player)
local backpack = player.Backpack
if backpack:FindFirstChild("AssaultRifle")then
local rocket = backpack:FindFirstChild("AssaultRifle")
wait(1)
if backpack == nil then
rocket:Destroy()
end
end
end
script.Parent.TouchEnded:Connect(takeWeapon)

1 comment
you are using touch detection for a seat?