This item is not replicated across Roblox’s server/client boundary.
This property can only be read from. Attempting to write to it will cause an error.
The FollowUserId is a
Player property that contains the
Player/UserId of the user that a player followed into the game. If the player did not follow anyone into the game, this property will be 0. This property is useful for alerting players who have been followed by another player into the game.
You can get the name of the player followed using this user ID and the
This code sample alerts players if a new player follows the local player into the game. It does so using a
Hint. Place this in a
local Players = game.GetService("Players") local Debris = game:GetService("Debris") local player = Players.LocalPlayer local function onPlayerAdded(newPlayer) if newPlayer.FollowUserId == player.UserId then local hint = Instance.new("Hint") hint.Parent = player:WaitForChild("PlayerGui") hint.Text = "You were followed to this game by " .. newPlayer.Name .. "!" Debris:AddItem(hint, 3) end end Players.PlayerAdded:Connect(onPlayerAdded)