function joined(plr) local a = Instance.new("Hint", game.Workspace) a.Text = plr.Name.. "has joined! | Age: " ..plr.AccountAge.. " | " ..plr.MembershipType wait(10) a:remove() end game.Players.PlayerAdded:connect(joined)
The problem is that MembershipType is an Enum. An Enum is a userdata value and cannot be concatenated.
There are two ways to do this. The easier way is to simply convert the enum to a string and chop off the Enum.MembershipType.
part of it. This way it will return None, BuildersClub, TurboBuildersClub, or OutrageousBuildersClub.
function joined(plr) local a = Instance.new("Hint", game.Workspace) local membership = string.sub(tostring(game.Players.Player.MembershipType), 21) a.Text = plr.Name.. "has joined! | Age: " ..plr.AccountAge.. " | " .. membership wait(10) a:remove() end game.Players.PlayerAdded:connect(joined)
The other way to do this is to check which enum is being used and change the message accordingly. This allows you to use abreviations or what ever you'd like.
function joined(plr) local a = Instance.new("Hint", game.Workspace) local membership if plr.MembershipType == Enum.MembershipType.None then membership= "NBC" elseif plr.MembershipType == Enum.MembershipType.BuildersClub then membership= "BC" elseif plr.MembershipType == Enum.MembershipType.TurboBuildersClub then membership= "TBC" elseif plr.MembershipType == Enum.MembershipType.OutrageousBuildersClub then membership= "OBC" end a.Text = plr.Name.. "has joined! | Age: " ..plr.AccountAge.. " | " .. membership wait(10) a:remove() end game.Players.PlayerAdded:connect(joined)