Well, I am trying to make the following script check if there is a tool in the character taking into account the tools that are located in ServerStorage, if it does not find a tool, it will give ("There are no Tools")
, and if it does find a tool will print ("Yes there are tools")
. After testing the script, apparently it detects both (so it gives both prints)
local Players = game:GetService("Players")
local TweenService=game:GetService("TweenService")
local ServerStorage = game:GetService("ServerStorage")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Ventanilla = script.Parent:WaitForChild("Ventanilla")
local Plato = script.Parent:WaitForChild("Plato")
local Proximity = Ventanilla:WaitForChild("Cuadro"):WaitForChild("ProximityPrompt")
local IsOpen = false
local Debounce = false
if not Ventanilla:FindFirstChild("Weld") then
local Weld = Instance.new("Weld", Ventanilla)
Weld.Part0 = Ventanilla:WaitForChild("Cuadro")
Weld.Part1 = Ventanilla:WaitForChild("Cuadro"):WaitForChild("Part")
end
Proximity.Triggered:Connect(function(player)
local Backpack = player["Backpack"]
local Character = workspace[player.Name]
for _, GetTools in pairs(ServerStorage.ToolsFolder:GetChildren()) do
if Character:FindFirstChild(GetTools.Name) then
print("Yes there are tools")
else
print("There are no Tools")
end
end
end)