#How would I make a script that is only ran if someone is in a group.

4 messages · Page 1 of 1 (latest)

near thunder
#

Like a door going no collision., but I want multiple groups able to do it.

#
script.Parent.Touched:Connect(function(hit)
    if hit and hit.Parent:FindFirstChild("Humanoid")then

        local player = game.Players:GetPlayerFromCharacter(hit.Parent)
        local groupID = 10506530

        if player:IsInGroup(groupID)then
            script.Parent.CanCollide = false
            wait(.5)
            script.Parent.CanCollide=true
        end
    end
end)
#

Thats what I have ^

calm root
#

If you want multiple groups then use a table