[THIS IS NOT A REQUEST. I NEED HELP.]
Hello, I’m currently looking to turn this rank detector into a detector that searches the players inventory for a item called “Stolen Access Card” or “Stolen Glock”.
Here is my script:
https://hastebin.com/edogenamoq.sql
Thanks alot,
Rook
For starters, GetPlayerFromCharacter() should do the trick instead of that function up there.
`local hum = part.Parent:FindFirstChild("Humanoid")
It's quite a old tactic, but it would do the trick for checking if the touch is still a player's character and not some random part, as .Touched sometimes is buggy like that.
if hum then local player = game.Players:GetPlayerFromCharacter(part.Parent)`
`
if player:GetRankInGroup(groupid) <= 11 then --DO THIS end
Obviously there's a lot of other ways of doing hum, I just used that because it's been a method for years, I wouldn't use it for much now a days, but I figured I'd use it as an example of how you could redo a bit of the code.
Obviously if you need more than 1 group, you can use a table instead of that plain old if statement as well.
Closed as Non-Descriptive by DeceptiveCaster, gullet, and namespace25
This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.
Why was this question closed?