So I was making a for loop, and it kept breaking but I didn’t know why. Here’s a funny thing that happened when I commented it out:
--bigcrazycarboy
local Event = game.ReplicatedStorage:FindFirstChild("GunSwapEvent", true)
function DropGun(Tool)
end
hi = false
local UIS = game:GetService("UserInputService")
UIS.InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.V and hi == false then
--hi = true
--[[for _,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
print("Began for loop.")
warn(game.Players.LocalPlayer.Character.Name)
print(v.Name)
if --[[v:isA("Tool")]] v.ClassName == "Tool" then
warn("Found a tool")
--v:Destroy()
Event:FireServer("Drop", v)
--DropGun(v)
warn("Fried the server to drop")
end
wait()
--script.Box.Value.Gun.Value:Clone().Parent = game.Players.LocalPlayer.Character
end ]]
print("done w loop")
Event:FireServer("PickUp", script.Box.Value)
--script.Box.Value:Remove()
warn("Fried the Server")
end
end)