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

Why doesn't my GetRankInGroup Script work, but with the :IsInGroup format works? No errors.

function onClicked()
	wait()
	if game.Players.LocalPlayer:GetRankInGroup(2989165) > 3 then
		script.Parent:Destroy()
	end
end

script.Parent.MouseButton1Down:connect(onClicked)

I have no clue why this doesn't work, it works with the :IsInGroup(2989165) format.

1 comment

0

Is this script in the workspace? if so localscripts dont execute there.

1 answer

script.Parent.MouseClick:connect(function(playerWhoClicked)
    local Player = playerWhoClicked -- you don't even need this line. just use playerWhoClicked directly
    --TODO: Rest of the code
end)

I'm guessing you don't have a local script.

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