How can I do this?

bf6c189db5d9e3a4af34b7a6e0b239c6

Yeah sorry, confusion with MouseClick1. Also, I dont think he wanted players in the group to have but in a particular team.

Ok, let me explain.

I want people, in the group be ABLE to get the tools if they click on the locker. If they donā€™t want it, they donā€™t have to click it. I want it to give the player that clicked on it the police tools that I have specified(only M4 atm).

I think I know what you did, you didnt put this:

game.ServerStorage.M4.Parent = PlayerModel

Do you want a specific rank or EVERYONE in that group?

Specific Rank & above.

Like Probationary Officer & above.

wait are you getting this from ServerStorage?

Iā€™ve just selected a random group Iā€™m in, and the rank rn because I ahvenā€™t made the CHP group.

local clickDetector = workspace.Part.ClickDetector
  function onMouseClick()
       if player:GetRankInGroup(123) >= 456 then -- replace 123 with group id 456 with minimum rank id
        game.ServerStorage.M4:Clone()
        game.ServerStorage.M4.Parent = player.Backpack
 end
 
clickDetector.MouseClick:connect(onMouseClick)

Try to execute something like this. Just took some of @COUNTYL1MITSā€™s code.

Yeah, lol where else would I get it from.

Ok, Iā€™ll try it. I think its gonna work.

Okay hereā€™s what you should do, put the tool in lighting and then put this script, as a server script inside of what you want to click to get the weapon. put ā€œWaterBucketā€ to whatever the tools name is

function hi(x)
	local y = x.Backpack
	local z = game.Lighting["WaterBucket"] 
	z:Clone().Parent = y   


end

script.Parent.ClickDetector.MouseClick:connect(hi)

( a server script is just a normal script, a few people have asked me that )

Again, didnā€™t work. OOOOOOOOF!

alr lemme try it, idk why Iā€™d put it in lighting though.

Lighting is just a spot I like to hide weapons, it keeps their position and doesnā€™t let you touch it or even interact with it in studio, just like serverstorage.

259e51b507972cc5a113c471694062f3

show me the console.
There might be an error with the click detector

So we never thought of showing the Output or Script analysis lol, that could help

did you put the script inside a local script?