Answered by
6 years ago Edited 6 years ago
On line 45, you can add your friends name to the if statement. Here's what I mean:
1 | if GamePassService:UserOwnsGamePassAsync(player.userId, GamePassIdObject.Value) or player.Name = = "NameHere" then |
2 | TeleportToOtherSide(player.Character, otherPart) |
However, using a player's name isn't the best thing to do because players can change their name and it'd no longer work. Instead, you can use their UserID:
1 | if GamePassService:UserOwnsGamePassAsync(player.userId, GamePassIdObject.Value) or player.UserId = = 12345 then |
2 | TeleportToOtherSide(player.Character, otherPart) |
There are other ways to do this, I'd just thought that this would be the easiest way for you. Also, you should use tab to indent your scripts instead of space. One more thing, make sure to use :Connect() instead of :connect() which is deprecated.