I'm not all that great with lua so i have no idea what i'm doing but i want a certain rank to get gear and this is what i have. It doesn't seem to work and i have no idea why, I used this same method for Rank Colors.
GroupId = 1141758 UnrefinedRank = newPlayer:GetRankInGroup(GroupId) function onPlayerEntered(newPlayer) if UnrefinedRank = 254 then game.Lighting["Taser"]:Clone().Parent = newPlayer.StarterGear end if UnrefinedRank = 254 then game.Lighting["Baton"]:Clone().Parent = newPlayer.StarterGear end end game.Players.PlayerAdded:connect(onPlayerEntered)
Try this!
GroupId = 1141758 game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:wait() UnrefinedRank = player:GetRankInGroup(GroupId) if UnrefinedRank >= 254 then game.Lighting["Taser"]:Clone().Parent = player.StarterGear game.Lighting["Baton"]:Clone().Parent = player.StarterGear game.Lighting["Taser"]:Clone().Parent = player.Backpack game.Lighting["Baton"]:Clone().Parent = player.Backpack end end)
Alright, so the first thing I noticed wrong is your syntax.
GroupId = 1141758 UnrefinedRank = newPlayer:GetRankInGroup(GroupId) function onPlayerEntered(newPlayer) if UnrefinedRank == 254 then --One equals sign just means that a value is getting assigned to the object or variable. Use two equals signs to check if it's the same as. game.Lighting["Taser"]:Clone().Parent = newPlayer.StarterGear end if UnrefinedRank == 254 then game.Lighting["Baton"]:Clone().Parent = newPlayer.StarterGear end end game.Players.PlayerAdded:connect(onPlayerEntered)
Locked by adark and TheMyrco
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?