Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make this rank detector turn into a tool detector???

[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

5 comments

0

Could you explain the issue you're having

0

It doesn't seem you've provided an attempt... which makes it a request even if you claim it is not.

0

Exactly. Show something you tried @RookPvPz

0

this is a request, im so rebel

0

Are you using a free script?

1 answer

✓ Accepted answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.