When someone is joined in a group what i select then apply a script what I scripted so I think: *Script to apply the script when someone is joined in the group" workspace.example:Play() workspace.example.Transparency = 0 workspace.example.CanCollide = false And when is he not joined in the group then apply another script what ONLY work when is he not joined in the group so I think: Script what apply ONLY when a player Is not joined in the group workspace.example:Play()
✓ ANSWER ACCEPTED
How i can apply a script only when a player is joined or not in group?
1 answer
✓ Accepted answer
You can't apply a script when someone has joined a certain group. But you can do this.
Inside a script, if you would like something to happen you would use Player:IsInGroup(GroupID) to accomplish this :)
Alright, so I'll show you how it's done.
Add a script inside ServerScriptService.
Inside that script you would type :
local GroupId = 0000000 -- Put the group id here,
game.Players.PlayerAdded:Connect(function(player)
if player:IsInGroup(GroupId) then
-- Script stuff here
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
