Script cannot find a tool

Hello I am making an airport game and I trying to make a conveyer, when I equip the tool moves to the characters model but when I unequip it is moves back to my backpack and for some reason it only works when the tool unequiped

please help me thank you

My script:

local cd = script.Parent.Promptattachment.ProximityPrompt
local drp = script.Parent.Parent.Drop
local conv = script.Parent.Parent.Conveyer.Conveyer.conv


cd.Triggered:Connect(function(player)
	print("Triggred")
	local bp = player.Backpack
	if bp:FindFirstChild("Suitcase") then
		
		print("Suitcase Found")
		local luggage = bp.Suitcase
		luggage.Enabled=false
		print("Getting Suitcase")
		luggage.Parent=script.Parent.Parent
		luggage.Handle.CFrame = drp.CFrame
		luggage.Handle.Anchored=false
				
		--[[conv.Velocity = conv.CFrame.LookVector* -4
		wait(5)
		conv.Velocity= 0--]]
	elseif player:FindFirstChild("Suitcase") then
		print("Suitcase Found")
		local luggage = player:FindFirstChild("Suitcase")
		luggage.Enabled=false
		print("Getting Suitcase")
		luggage.Parent=script.Parent.Parent
		luggage.Handle.CFrame = drp.CFrame
		luggage.Handle.Anchored=false
	end
	
	
end)

I fixed it turns out the tool was in player.Character not player

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.