You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
unequipped tool from all players in the server at the one time
What is the issue? Include screenshots / videos if possible!
unable to script it correctly
I am using this in the script to gather the player but am inable to uneqipped the server.
for _,plr in pairs(game.Players:GetChildren()) do
end
ardrous
(ardrous)
July 20, 2022, 4:09am
2
Get the tool from the character and move it to player.Backpack.
tlr22
(FusionOak)
July 20, 2022, 4:09am
3
for _,plr in pairs(game.Players:GetPlayers()) do
if plr.Character then --make sure they have a character so you don't throw an error
local tool = plr.Character:FindFirstChildOfClass("Tool")
if tool then
tool.Parent = plr.Backpack -- or you could do tool:Destroy()
end
end
end
1 Like
Honestly, if you don’t want to break your scripts (unequipped event doesnt always fire in tools, after parented)
Find the Humanoid of the player, and run hum:UnequipTools() on it.
That’s simply a better way to avoid tools from breaking.
2 Likes