So i am working on a DayZ Slot system, so here's what i got currently.
flashlight = game.Players.LocalPlayer.Backpack:FindFirstChild("Flashlight")
gui = game.Players.LocalPlayer.PlayerGui.Backpack.BackPack.Slots.Slot1
if flashlight then
print("Player has Flashlight!")
gui.Text = "Flashlight"
elseif flashlight == nil then
print("No Flashlight Found!")
gui.Text = "Empty Slot"
end
I am trying to figure out how it can detect if the weapon is equipped or not? i can not find a wiki for this.

3 comments
Ok, so one last question, if you get this next one right i shall. I need to make sure the script can detect when they drop it to set the text to "Empty Slot", i've been trying myself this whole time.
When they drop it? Or unequipped it? Have a while true do loop and make it check if it's in their Backpack and in their character. If neither, then have it set the text. I don't want to do it for you, because I want you to learn.
If they drop it cause i have the check on the equip now.