Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Admin only tools not working. Any explanations or answers why?

Asked by 5 years ago

I tried making a admin only tools script while local, no errors and it doesnt work. Why?

local allowed = {'gugaplayer_2017ALT','ChronoFantastic'}
local ToolBin = game.Lighting.ToolBin
local hexa = ToolBin["Hexabyte Card"]
game.Players.LocalPlayer:WaitForChild("Backpack")
local backpack = game.Players.LocalPlayer.Backpack

game.Players.PlayerAdded:Connect(function()
    for i,v in pairs(game.Players:GetChildren()) do
        if v.Name == allowed[2] then
    table.insert(hexa:Clone(), backpack)
        end
        end
end)

1 answer

Log in to vote
0
Answered by
Rare_tendo 3000 Moderation Voter Community Moderator
5 years ago

Table.insert is used to insert a variant into a table.

Here's a fix for line 10:

hexa:Clone().Parent = backpack
0
It doesnt work :( User#22722 20 — 5y
Ad

Answer this question