#How would I make a script that is only ran if someone is in a group.
4 messages · Page 1 of 1 (latest)
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 ^
If you want multiple groups then use a table