You know how when your gun is equipped or unequipped the gun is in different places right? That is my problem.
I tried two scripts to solve this. 1 for the gun in the character, and 1 for the gun being in the player's backpack.
The purpose of the script is to remove the gun when you stand up after you were sitting down from a certain seat.
Is there anything wrong with these scripts?
--When gun is equipped
while true do
wait()
if script.Parent.Parent:FindFirstChild("Humanoid").Sit == false then
script.Parent:remove()
end
end
--When gun is unequipped
while true do
wait()
if script.Parent.Parent.Parent:FindFirstChild("Character"):FindFirstChild("Humanoid").Sit == false then
script.Parent:remove()
end
end
I need an answer immediately.

2 comments
Replace :remove() with :Destroy().
Your problem is lines 4 of the first and second code; 'Humanoid' is not existant within the Player itself, and the Player's Character is not existant within the Player; The 'Character' is a property to specify the Player's Character; Not a Child within the Player itself. :P