Checking if player is in group

This is the script that I wrote in case anyone ever needs it in the future. Thanks

local ss = game:GetService("ServerStorage")
local cola = ss:FindFirstChild("BloxyCola")
game:GetService("Players").PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function()
	if player:IsInGroup(9272318) then
		print(player.Name.." is in group!")
		local bloxyclone = cola:Clone()
		bloxyclone.Parent = player.Backpack
		print(bloxyclone.Parent)
		bloxyclone.Name = "bloxyclone"
	else
		print(player.Name.." isn't in group :(")
		end
	end)
end)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.