Friend Only Game Script

Hello, I was curious to how I could make my game friends only.

I came up with a solution, where a script checks if you’re my friend, and if your not then it will kick you saying “You’re not my friend!”

Problem, I don’t know how to make that.

Does anyone know a script that could make that work, or at least a video/tutorial of how I can make one, thanks!

Well one solution is to set the game permission so that only your friends can join in the game settings but Idk the other way which checks if someone is your friend but try reverse engineering a friends only door in the toolbox

1 Like

I’ve done that though I kind of want the kick thing, plus the message.

Try reverse engineering a friends only door in the toolbox

1 Like

Orjust google it this stuff is common knowledge

1 Like

The Players service provides a function for you to get a players friends. It also includes a neat example of it being used. Refer to Players | Documentation - Roblox Creator Hub

1 Like