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
 

Re: Variable Help

Previous Thread :: Next Thread 
utabon is not online. utabon
Joined: 12 Aug 2009
Total Posts: 900
20 Jun 2014 06:53 PM
Thanks to: KnightmareXD

So KnightmareXD wrote me this script, thanks man. But I dont understand what Player the variable means. He left it blank and I'm confused, if you could help me I would really appreciate, thanks :)


local Player =

local GamePassId = 123123123

if Game:GetService("GamePassService"):PlayerHasPass(Player, GamePassId) then
Game:GetService("PointsService"):AwardPoints(Player.userId, 2)
else
Game:GetService("PointsService"):AwardPoints(Player.userId, 1)
end
Report Abuse
EncodedLua is not online. EncodedLua
Joined: 02 May 2012
Total Posts: 1555
20 Jun 2014 06:55 PM
hm... Did it have an equals sign when you got it or was it just local Player?
Report Abuse
EncodedLua is not online. EncodedLua
Joined: 02 May 2012
Total Posts: 1555
20 Jun 2014 06:56 PM
And you should make all of that code run when this event fires:

game.Players.PlayerAdded:connect(function(Player)
--code goes here
end)

And that would fix the variable problem
Report Abuse
IAmTheRolo is online. IAmTheRolo
Joined: 12 Nov 2013
Total Posts: 859
20 Jun 2014 06:56 PM
It means you have to define Player
Report Abuse
utabon is not online. utabon
Joined: 12 Aug 2009
Total Posts: 900
20 Jun 2014 06:58 PM
I know I have to define it, but I dont know what to define it as.
Report Abuse
SilverArgentum is not online. SilverArgentum
Joined: 01 Nov 2011
Total Posts: 1162
20 Jun 2014 07:00 PM
where is the script located?
Report Abuse
utabon is not online. utabon
Joined: 12 Aug 2009
Total Posts: 900
20 Jun 2014 07:01 PM
Inside a brick
Report Abuse
TheNewScripter is not online. TheNewScripter
Joined: 02 Mar 2010
Total Posts: 2432
20 Jun 2014 07:02 PM
I'm assuming this code gets executed after someone touches the brick, right?
Report Abuse
utabon is not online. utabon
Joined: 12 Aug 2009
Total Posts: 900
20 Jun 2014 07:03 PM
Correct :)
Report Abuse
utabon is not online. utabon
Joined: 12 Aug 2009
Total Posts: 900
20 Jun 2014 07:30 PM
Bump :P
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