of     1   

Cyovo
#183476629Saturday, February 13, 2016 2:50 AM GMT

I am not sure what this error means? 18:48:57.291 - Argument 1 missing or nil 18:48:57.292 - Script 'ServerScriptService.Script', Line 15 18:48:57.293 - Stack End local function WaitForChild(parent, childName) assert(parent, "ERROR: WaitForChild: parent is nil") while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end return parent[childName] end local ChatStorage = game.Workspace:FindFirstChild("ChatStorage") local GamePassIdObject = script.N.Value local GamePassService = game:GetService('GamePassService') local PlayersService = game:GetService('Players') game.Players.PlayerAdded:connect(function(plr) plr.Chatted:connect(function(Message) local StringVal = Instance.new("StringValue", ChatStorage) local player = PlayersService:GetPlayerFromCharacter() if GamePassService:PlayerHasPass(player, GamePassIdObject.Value) then StringVal.Name = "[VIP]"..plr.Name.." : "..Message else StringVal.Name = plr.Name.." : "..Message end end) end)
cpmoderator12345
#183476857Saturday, February 13, 2016 2:53 AM GMT

getplayerfromcharacter requires a argument of a player type https://www.youtube.com/watch?v=onhFH7jpq2c
cpmoderator12345
#183476908Saturday, February 13, 2016 2:53 AM GMT

like this: local player = game.Players:GetPlayerFromCharacter(plrname) https://www.youtube.com/watch?v=onhFH7jpq2c
Reset8954098
#183477068Saturday, February 13, 2016 2:56 AM GMT

"local player = PlayersService:GetPlayerFromCharacter() if GamePassService:PlayerHasPass(player, GamePassIdObject.Value) then" One, PlayerHasPass requires a Instance with class of 'Player', I don't know where you could've gotten the idea it requires a Character. http://wiki.roblox.com/index.php?title=API:Class/GamePassService/PlayerHasPass Two, the first argument was nil due to the face 'GetPlayerFromCharacter' has no argument(Oh wait, that could be what's causing the error). GetPlayerFromCharacter requires a model instance to attempt to get a Player Instance from. So, the fact that you're trying to do that, "player" would "==nil". If you're trying to get the client the local script is in, then use "Players.LocalPlayer". http://wiki.roblox.com/index.php?title=API:Class/Players/GetPlayerFromCharacter http://wiki.roblox.com/index.php?title=API:Class/Players/LocalPlayer Three, it's not recommended to use "GamePassService.PlayerHassPass" due to the fact that it's cached. Try "MarketplaceService.PlayerOwnsAsset" instead. http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PlayerOwnsAsset
cpmoderator12345
#183477375Saturday, February 13, 2016 3:01 AM GMT

oh i read that wrong yeah it requires a model type (which would be a player's character) i was thinking of GetCharacterFromPlayer https://www.youtube.com/watch?v=onhFH7jpq2c
Reset8954098
#183477830Saturday, February 13, 2016 3:08 AM GMT

@cpmoderator12345 There is no such method of "GetCharacterFromPlayer", instead use "Player.Character" to get the Character model of a Player.
Icecreamtopblank
#183481606Saturday, February 13, 2016 4:06 AM GMT

http://wiki.roblox.com/index.php?title=API:Class/Players/GetPlayerFromCharacter I mean... it's a function.... You're right though not a method
Reset8954098
#183481946Saturday, February 13, 2016 4:11 AM GMT

@Icecreamtopblank "GetCharacterFromPlayer"~="GetPlayerFromCharacter"
Icecreamtopblank
#183481980Saturday, February 13, 2016 4:11 AM GMT

ooohh my bad xD
cpmoderator12345
#183491327Saturday, February 13, 2016 8:04 AM GMT

i need better eyes https://www.youtube.com/watch?v=onhFH7jpq2c
OzzyFin
#183491552Saturday, February 13, 2016 8:15 AM GMT

"I mean... it's a function.... You're right though not a method" you can call functions as methods game.Players:GetPlayerFromCharacter(char) would call GetPlayerFromCharacter with game.Players as the first argument, it is called a method and would equal to game.Players.GetPlayerFromCharacter(game.Players,char)
cpmoderator12345
#183612221Sunday, February 14, 2016 8:51 PM GMT

true but thats a bad practice unless you like to obfuscate code https://www.youtube.com/watch?v=onhFH7jpq2c

    of     1