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

How do I make it so that u need a specific rank to get a weapon from the gui?

Asked by 5 years ago

So I am currently scripting a FPS game that I am making, how do I make it so that you need a specific rank to get a weapon?

0
In a group or in the game? MachoPiggies 526 — 5y

1 answer

Log in to vote
0
Answered by
xJigoku 17
5 years ago

One way to do this (how I would do it) is to have a value placed into the player, the value would act as their rank. Now when the player clicks on the button it checks for that value and if it's in the player then it will give the weapon.

Server: game.Players.PlayerAdded:Connect(function(Player) local RankValue = Instance.new("IntValue") RankValue.Name = "Legend" RankValue.Parent = Player end)

Client: Button.MouseButton1Click:Connect(function() if Player:FindFirstChild("Legend") then -- Give weapon else -- Give error message or remove 'else' to do nothing end end)

Ad

Answer this question