So I’m trying to make a tool delete system and it doesn’t seem to fire the remote event.
Local Script:
for _,v in pairs(Output:GetChildren())do
if(v:IsA("Frame")) then
v:WaitForChild("DeleteTool").MouseButton1Click:Connect(function()
local Args = {
[1] = 'Delete Tool',
[2] = Input.Text,
[3] = v:WaitForChild("Name").Text,
}
Event:FireServer(unpack(Args))
v:Destroy()
end)
end
end
Server:
Event.OnServerEvent:Connect(function(Client, Type, Target, ToolName)
if(Type == "Delete Tool")then
if(Players:FindFirstChild(Target))then
local playerToTarget = Players:FindFirstChild(Target)
if(playerToTarget.Backpack:FindFirstChild(ToolName))then
playerToTarget.Backpack:FindFirstChild(ToolName):Destroy()
end
end
end
end)
Did you add a “print” function at the top of the remote event (server side) to see what exactly is being sent or to see if the server got the request at all?
Yeah I did and it’s not firing at all I have to put the for loop into a while wait() do to make it work for some reason but it I do put it in a while wait() do it will spam fire the event.