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

How to make VIP Tools for Players (Not doors)?

Asked by 10 years ago

Hi, Im having trouble on obtaining this script

A script that gives VIP tools DIRECTLY ON SPAWN but it has to be detected by name. not T-Shirts and not Gamepasses

1 answer

Log in to vote
0
Answered by 10 years ago
local vips = { --vip table
    "ForeverDev",
    "Revenant101"
}

local toolsToGive = { --all the tools you want the vip to receive when they spawn
    game.Lighting.Tool1:clone(),
    game.Lighting.Tool2:clone()
}

game.Players.PlayerAdded:connect(function(player) --fires when a new player joins the game
    player.CharacterAdded:connect(function(char) --fires when the player spawns
        for i, v in pairs(vips) do --iterate through the vip table
            if v:lower() == player.Name:lower() then --if the player is found in the vip table
                for t, o in pairs(toolsToGive) do --iterate through the tools table
                    o:clone().Parent = player.Backpack --clone the tool and put it in the backpack
                end
            end
        end
    end)
end)
0
I does not work. I changed tool1 and 2 to the name of the tools in my game but it dosent give it. Revenant101 25 — 10y
Ad

Answer this question