Staff only proximity prompt

Hey, I need some help with this. I want to make a staff only wall so this is what I have:

local Proximity = script.Parent
local Proximity2 = game:GetService(“Workspace”).part.ProximityPrompt1

local ProtectedCall = pcall
local GroupId = 17256639
local GroupRank = 1

Proximity.Triggered:Connect(function(Player)
	local Success, Result = ProtectedCall(function()
		return Player:GetRankInGroup(GroupId)
	end)

	if Success and
		Result >= GroupRank then
		local backpack = player.Backpack
		local tool = game.ServerStorage.Part1 -- make sure you have that item in serverstorage if not change to replicated storage and change “Cup” to your item mame.
		local IsCup = true

		local toolClone = tool:Clone()

		if IsCup == true then

			toolClone.Parent = backpack
		end  -- this might be an extra end if script doesnt work delete it and try again
	end
end
end)

This is not working, please help

1 Like