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

How do I make this script show the gui to a group rank only?

Asked by 4 years ago
debounce = false
storage = game.ServerStorage:WaitForChild("VehicleStorage")
deal = script:WaitForChild("Dealer")
cooldown = false

script.Parent.ClickDetector.MouseClick:connect(function(plr)
    newGui = deal:clone()
    cars = storage:GetChildren()
        for i, v in ipairs(cars) do
        local button = deal.Main.DefaultButton:Clone()
        button.Name = "Button"..i
        button.Text = v.Name
        button.Visible = true
        button.Parent = newGui.Main
        button.Position = UDim2.new(0,0, (.05 * (i-1)), 0)
    end
        newGui.Parent=plr.PlayerGui     
end)

game.ReplicatedStorage.ChooseVehicle.OnServerEvent:connect(function(client, event, pad)
local player = client
if pad == script.Parent and cooldown == false then
local carChoice = storage:FindFirstChild(event)
        newCar = carChoice:clone()
        newCar.Parent = game.Workspace
        newCar:MoveTo(script.Parent.Position)
        cooldown = true
        wait(10)
        cooldown = false
end
end)
0
if PLAYER:IsInGroup(ID) then parker02311 27 — 4y

Answer this question