iDertus7
(Ignosce)
October 30, 2024, 7:09am
#1
So pretty much, all I want is to add a tool to starterpack, and then make it only work for me.
So if anyone else joins the game, they won’t get the tool.
The reason I want to do it this way is because if I add a tool directly to the character, it auto-equips the tool and breaks the script etc.
My script basically detects if the PLAYER equips a tool, so I don’t know why it doesn’t detect it when it gets added to the players character.
Front3D
(Front3D)
October 30, 2024, 7:27am
#2
Do you mean something like this?:
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
if player.Name ~= "Player" then
local backpack = player:WaitForChild("Backpack")
for _, tool in ipairs(backpack:GetChildren()) do
if tool:IsA("Tool") then tool:Destroy() end
end
end
end)
iDertus7
(Ignosce)
October 30, 2024, 7:39am
#3
This code destroys the tool for anyone that is not player, right?
In my case, I would replace “player” with “iDertus7”.
If this is true, i’ll give you the solution
Front3D
(Front3D)
October 30, 2024, 7:46am
#4
Yes thats what it does, just replace the Player with your username
system
(system)
Closed
November 13, 2024, 7:47am
#5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.