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: What's wrong with this Gamepass script?

Previous Thread :: Next Thread 
DeadDemon959 is not online. DeadDemon959
Joined: 29 Dec 2009
Total Posts: 2969
30 May 2013 07:13 AM
local passId = 117164040

function authenticate(player)
return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end

game.Players.PlayerAdded:connect(function(plr)
if authenticate(plr) then
print(plr.Name .. " has bought the game pass with id " .. passId)
plr.CharacterAdded:connect(function(char)
local bf = Instance.new("BodyForce", char)
for i, v in pairs(char:GetChildren()) do
if v:IsA("Hat") then
bg.force = bf.force + Vector3.new(0,v.Handle:GetMass()-75,0)
elseif v:IsA("BasePart") then
bg.force = bf.force + Vector3.new(0,v:GetMass()-75,0)
end
end)
end
end)


Inserted into workspace. It's supposed to give the game pass owner -75 gravity.
Report Abuse
DeadDemon959 is not online. DeadDemon959
Joined: 29 Dec 2009
Total Posts: 2969
30 May 2013 07:36 AM
Bump
Report Abuse
DeadDemon959 is not online. DeadDemon959
Joined: 29 Dec 2009
Total Posts: 2969
30 May 2013 03:04 PM
Your favorite bump.
Report Abuse
DeadDemon959 is not online. DeadDemon959
Joined: 29 Dec 2009
Total Posts: 2969
30 May 2013 03:48 PM
berp
Report Abuse
PortForward is not online. PortForward
Joined: 09 May 2013
Total Posts: 215
30 May 2013 03:58 PM
Please keep this to 1 thread >.>

The last good thing written in C was Franz Schubert’s Symphony Number 9.
Report Abuse
PortForward is not online. PortForward
Joined: 09 May 2013
Total Posts: 215
30 May 2013 03:59 PM
you never defined plr

The last good thing written in C was Franz Schubert’s Symphony Number 9.
Report Abuse
DeadDemon959 is not online. DeadDemon959
Joined: 29 Dec 2009
Total Posts: 2969
30 May 2013 04:00 PM
And what should I define it as?
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
30 May 2013 04:02 PM
@Port

'plr' is defined.

Look in the parameters for the anonymous function.

@OP

Ignore port, he probably didn't notice that it was actually already defined.
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
30 May 2013 04:08 PM
What's "bg"? You've used it twice, but it's not defined anywhere.
Report Abuse
DeadDemon959 is not online. DeadDemon959
Joined: 29 Dec 2009
Total Posts: 2969
30 May 2013 04:12 PM
Note; I didn't make this script. And I know nothing about scripts... So, if something isn't defined, what should I define it as and how?
Report Abuse
DeadDemon959 is not online. DeadDemon959
Joined: 29 Dec 2009
Total Posts: 2969
30 May 2013 04:34 PM
Derpabump
Report Abuse
DeadDemon959 is not online. DeadDemon959
Joined: 29 Dec 2009
Total Posts: 2969
30 May 2013 05:14 PM
Don't hate me for the bump
Report Abuse
DeadDemon959 is not online. DeadDemon959
Joined: 29 Dec 2009
Total Posts: 2969
30 May 2013 06:00 PM
Herr
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