#Deleting Text Channels for Local Player

1 messages · Page 1 of 1 (latest)

worldly pilot
#

So I'm creating a game where there are Players and there are Staff, and I want it to be so that Players can only see General chat, but Staff can see General Chat and Staff Chat. I have the join event set up so that people who join automatically get General Chat; I have the team change event set up so that people who switch to Staff teams see the Staff teams; but now I need it so that, if you switch to a team that doesn't have permissions to see a channel, it hides that channel so they can't speak in it or see it?

candid goblet
#

still need help?

worldly pilot
candid goblet
#

ai twin

#

u have to take the player out of the channel they shoulnt be in first

#

then you can put them in the right ones right now, your code only adds players to channels but doesnt remove them from channels they shouldnt see

worldly pilot
#

there’s nothing to remove people from channels

candid goblet
#

so u need to add the "remove" part before we add them back into the right channels.

worldly pilot
#

so how would i remove?

candid goblet
#

do u need help w that?

worldly pilot
#

ye

candid goblet
#

ou can use the RemoveUserAsync

worldly pilot
#

that doesn’t exist

candid goblet
#

ik cuz u need to use the RemoveUserAsync method provided by the TextChannel

worldly pilot
#

wdym

candid goblet
#

its a complicated thing but in short you can use: TextChannel:RemoveAllUsers()) which adds users back into the correct channels based on their teams

worldly pilot
#

this didn’t work