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.
When it's equipped, it can be found in their Character.
flashlight = game.Players.LocalPlayer.Character: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
~ Did I help you? Well, help me out by bumping up my reputation/accepting my answer!