Hey Developers,
My shutdown command is not working, here where is the error, well roblox studio think it is:
You can’t kick all of the players like that since the Players service doesn’t have a function called Kick
, you need to put a loop inside there that’ll loop through all of the players and kick them one by one
for i,player in pairs(game.Players:GetPlayers()) do
player:Kick(Your Kick message)
end
Edit: Make sure you change Your Kick message
to the message you want to display when a player is kicked. And yea, if you don’t know how a method works exactly, as @Feedekaiser mentioned, research it before attempting to try it
You are attempting to kick the Instance Players
, which there is no valid method for.
Please check the API-Reference before using any method you are not familiar with.
Oh, alright, next time before asking help I will verify the API, thanks you in advance. @EmbatTheHybrid This is working, thanks!
Anytime! If you have anymore issues don’t be afraid to make another post!