That’s weird, I don’t think I did anything that would break the code? Are there any errors in output?
No errors what so ever. Very strange. would it be because the fire client is outside of the task.wait?
No, that shouldn’t be a problem.
Does it continue to add more tools but only not delete them?
Inserted the FireAllClients in the task wait, it did delete a tool, yet one is still there.
Also yes, it adds more tools after this, BUT then deletes that one and not the other.
That’s confusing me, mind retrying and seeing if it’s consistent?
It fires the event without waiting. Im very confused.
Did you want it to fire when the tools are being deleted?
When the are given to the players. Im trying something right now to fix.
Oh wait im a idiot! I had a crossbow in starterpack before hand! Very Very sorry about this. It should work once i figure out how to make the text disappear, thanks!
Probably my last issue: The event fires before task wait, and the text wont disappear. Any way i could fix this?
Then you could probably add another parameter to the event
local tool = --tool
local event = --event
while task.wait(200) do
for i,v in pairs(game.Players:GetPlayers()) do
tool:Clone().Parent = v.Backpack
tool:Clone().Parent = v.StarterGear
end
event:FireAllClients(true)
task.wait(30)
event:FireAllClients(false)
for i,v in pairs(game.Players:GetPlayers()) do
local plrtool = v.Backpack:FindFirstChild(tool.Name) or v.Character:FindFirstChild(tool.Name)
if plrtool then
plrtool:Destroy()
end
v.StarterGear:FindFirstChild(tool.Name):Destroy()
end
end
local event = --event
local label = --label to change
event.OnClientEvent:Connect(function(text)
if text then
label.Text = "whatever here"
else
label.Text = ""
end
end)
It still fires before the wait is done? Everything else works.
What do you mean by fires before the wait is done?
Like the 1st task wait, it should do that wait before firing, yet it fires automatically.
It does do the wait before firing though?
Everything else works fine, just the firing of the event.
Its fixed randomly, thank you very much for your help.