Hi. Can you tell me whats wrong with this script and why it dos'ent work? this is a gui that gives a vip tool on clicked but it should be detedted by player name on who pressed the button
local vip = {"Revenant101"}
function onButtonClicked()
local tools = {
game.Lighting.Crystal:clone(),
game.Lighting.Memory:clone()
}
for i, v in pairs(vip) do
if v:lower() == player.Name:lower() then
for t, o in pairs(tools) do
o:clone().Parent = player.Backpack
end
end
end
end
script.Parent.MouseButton1Click:connect(onButtonClicked)

2 comments
Where is player defined?
player is us