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?
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)