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?
COMMUNITY QUESTION
How do I make it so that u need a specific rank to get a weapon from the gui?
1 answer
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
In a group or in the game?