Hello, I found 2 problems in the video you listed!
- You were removing it from the client and your code runs on the server, which means the on the client you don't have it, but on the server you do so the color won't change!
- The tool was called 201 in your video, but in the script it shows 202!
But here's a new script which works a bit better!
Script:
local PlayersService = game:GetService("Players")
PlayersService.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
while wait() do
for _, v in pairs(char:GetChildren()) do
if v and v:IsA("Tool") and v.Name == "202" then
v:FindFirstChild("Handle").Color = Color3.fromRGB(255,0,0)
else
v:FindFirstChild("Handle").Color = Color3.fromRGB(0,255,0)
end
end
for _, v in pairs(player.Backpack:GetChildren()) do
if v and v:IsA("Tool") and v.Name == "202" then
v:FindFirstChild("Handle").Color = Color3.fromRGB(255,0,0)
else
v:FindFirstChild("Handle").Color = Color3.fromRGB(0,255,0)
end
end
end
end)
end)
1 comment
https://imgur.com/a/2bXyPIc