The following script is me attempting to make it so once a player joins or resets they have the VIP GUI but only if they own the gamepass thing. The only issue is the output said: "Head is not a valid member of Player". I believe it's because it addresses the player in the script to the player categories and not the Workspace because the workspace holds the player's head and body parts. So, how do I make it so where it says ' newPlayer.Head.NameTag.VIP.Visible = true ' be addressing to the new player in the workspace and not the place where it is getting feedback from currently? Here is the script that I'm using. The GUI is inside ServerScriptService.
game.Players.PlayerAdded:connect(onPlayerRespawned)
function onPlayerRespawned(newPlayer)
wait(1)
if game.MarketplaceService:PlayerOwnsAsset(newPlayer, 4692779139) then
newPlayer.Head.NameTag.VIP.Visible = true
end
end
function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)
if (property == "Character") then
onPlayerRespawned(newPlayer)
end
end)
end
game.Players.PlayerAdded:connect(onPlayerEntered)

1 comment
Where do I insert that?