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 » Scripting Helpers
Home Search
 

Strange output

Previous Thread :: Next Thread 
chubba51 is not online. chubba51
Joined: 31 Dec 2008
Total Posts: 269
06 Apr 2013 05:53 PM
"Unable to cast value to Object"
script:

wait(2)
gpid = 111932133
BadgeID = 112038352
GPS = game:GetService("GamePassService")

function respawned(p)
player = game.Players:FindFirstChild(p.Name)
if p:FindFirstChild("Head") ~= nil then
if GPS:PlayerHasPass(player.userId, gpid) then
wait(2.5)
game:GetService("BadgeService"):AwardBadge(player.userId,BadgeId)
end
else
print("No GPID")
end
end
game.Workspace.ChildAdded:connect(respawned)
Report Abuse
tyzone is not online. tyzone
Joined: 16 Aug 2008
Total Posts: 1726
06 Apr 2013 05:58 PM
Can you tell which line of the script the output speaks of ?
Report Abuse
chubba51 is not online. chubba51
Joined: 31 Dec 2008
Total Posts: 269
06 Apr 2013 06:04 PM
it was in that roblox remote error monitor system script thing

line 9
Report Abuse
chubba51 is not online. chubba51
Joined: 31 Dec 2008
Total Posts: 269
06 Apr 2013 06:04 PM
"if GPS:PlayerHasPass(player.userId, gpid) then"

that line
Report Abuse
chubba51 is not online. chubba51
Joined: 31 Dec 2008
Total Posts: 269
06 Apr 2013 06:11 PM
bump
Report Abuse
tyzone is not online. tyzone
Joined: 16 Aug 2008
Total Posts: 1726
06 Apr 2013 06:19 PM
Just checked the wiki. I think it's because you're checking the userId. Try removing that ".userId" part and using the player's name as a value.
Report Abuse
MattJon is not online. MattJon
Joined: 28 Apr 2009
Total Posts: 660
06 Apr 2013 06:57 PM
Bumping that thread with the weird title down.
Report Abuse
chubba51 is not online. chubba51
Joined: 31 Dec 2008
Total Posts: 269
06 Apr 2013 07:26 PM
@matt

what...?

@other dude
now the output says "Argument 2 missing or nil"
for line 11
(This line):

"game:GetService("BadgeService"):AwardBadge(player,BadgeId)"
Report Abuse
chubba51 is not online. chubba51
Joined: 31 Dec 2008
Total Posts: 269
06 Apr 2013 07:31 PM
bump
Report Abuse
chubba51 is not online. chubba51
Joined: 31 Dec 2008
Total Posts: 269
06 Apr 2013 07:38 PM
anyone...?
Report Abuse
chubba51 is not online. chubba51
Joined: 31 Dec 2008
Total Posts: 269
06 Apr 2013 07:48 PM
wat do I do to fix whatever the error is telling me
Report Abuse
Treshold is not online. Treshold
Joined: 01 Aug 2012
Total Posts: 109
06 Apr 2013 07:58 PM
Your variable is called BadgeID, not BadgeId.
Report Abuse
chubba51 is not online. chubba51
Joined: 31 Dec 2008
Total Posts: 269
06 Apr 2013 08:04 PM
@Tres
*epic face palm of FINALLY it worked because of that*
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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