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

Script fail... Group rank tool giver not working? SOLVED

Hey does anyone know why this does not create output and doesn't error or give the tools?

local groupid = 3719230

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:connect(function()
		warn('Checking for group..')
		if plr:IsInGroup(groupid) and plr:GetRankInGroup(groupid) >= 254 then
			warn('Attempting to give tools')
			game.ServerStorage.Handcuffs:Clone().Parent = plr.Backpack
			game.ServerStorage["Security Taser"]:Clone().Parent = plr.Backpack
		end
	end)
end)

Help is needed, URGENTLY! I'm making a game for my friend and there is a dead line :(

Many thanks, Chris

5 comments

0

Did you want to give that tools to owner of the group?

0

Me and the owner, (co owners and owner)

0

does the warn statement show up in output?

0

Try having only the warn() in the if statement to debug this. If it works then it's because line 8-9 might not be finding the correct objects. If not then your groupid value is wrong or they are a lower rank than 254.

0

Check if the script is running, print something on line 1. If not it's either disabled or misplaced. Check the wiki as to where the different types scripts need to be placed to run.

1 answer

It suddenly started working when i put prints in it. Thanks a bundle gullet.

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