generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Unable to cast value to Object

Previous Thread :: Next Thread 
KarthonTulliusEnnius is not online. KarthonTulliusEnnius
Joined: 30 May 2010
Total Posts: 230
06 Aug 2015 01:38 PM
13:34:46.037 - Unable to cast value to Object
13:34:46.037 - Script 'Workspace.Part.Script', Line 3 - global isAuthenticated
13:34:46.038 - Script 'Workspace.Part.Script', Line 8



line 3:
return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)


line 8:
if isAuthenticated(plr) then
Report Abuse
KarthonTulliusEnnius is not online. KarthonTulliusEnnius
Joined: 30 May 2010
Total Posts: 230
06 Aug 2015 01:41 PM
I found out my error, I was had the variable plr be the name of the player, I need it to be the location of the player, I fixed by doing this.

local plrr = game.Players[plr]

if isAuthenticated(plrr) then
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
06 Aug 2015 01:42 PM
That doesn't make any sense, how could you have a reference to the player's name without having a reference to the player's object?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image