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: gamepass

Previous Thread :: Next Thread 
Trello is not online. Trello
Joined: 19 Feb 2010
Total Posts: 261
01 Sep 2013 06:40 PM
for Y,Q in pairs(shared.Tributes) do
if Q.Character:findFirstChild("Humanoid") then
Q.Character.Humanoid.WalkSpeed = 12
end
if GamePassService:PlayerHasPass(player, 11573874) then
game.Lighting.Gamepass.Bottle:clone().Parent = player.Backpack
end
end
end

how come this won't give the user the bottle? it is part of a larger script by the way.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
01 Sep 2013 06:45 PM
if Game:GetService("GamePassService"):PlayerHasPass(player, 11573874) then
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
01 Sep 2013 06:46 PM
vipspeed = 16--vip speed
regspeed = 12--regular speed
function haspass(player) return game:service("GamePassService"):PlayerHasPass(player, 11573874) end
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAddded:connect(function(char)
if haspass(plr) then
game.Lighting.Gamepass.Bottle:clone().Parent = player.Backpack char.Humanoid.WalkSpeed = vipspeed
else char.Humanoid.Walkspeed = regspeed
end)
end)
Report Abuse
Trello is not online. Trello
Joined: 19 Feb 2010
Total Posts: 261
01 Sep 2013 06:47 PM
thank you guys sooooo much

lemme make sure it works
Report Abuse
XtremeSpy is not online. XtremeSpy
Joined: 20 Nov 2011
Total Posts: 115
01 Sep 2013 06:48 PM
Remove a "d" from he PlayerAddded
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
01 Sep 2013 06:48 PM
Oops, the player object is assigned to "Q".

if Game:GetService("GamePassService"):PlayerHasPass(Q, 11573874) then
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
01 Sep 2013 06:48 PM
vipspeed = 16--vip speed
regspeed = 12--regular speed
function haspass(player) return game:service("GamePassService"):PlayerHasPass(player, 11573874) end
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
if haspass(plr) then
game.Lighting.Gamepass.Bottle:clone().Parent = player.Backpack char.Humanoid.WalkSpeed = vipspeed
else char.Humanoid.Walkspeed = regspeed
end)
end)
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
01 Sep 2013 06:49 PM
It was the .CharacterAdded event that had an extra 'd'.
Report Abuse
Trello is not online. Trello
Joined: 19 Feb 2010
Total Posts: 261
01 Sep 2013 07:13 PM
do the amount of indents i have on each line matter?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
01 Sep 2013 07:14 PM
No.
Report Abuse
Lapwn is not online. Lapwn
Joined: 03 Jun 2012
Total Posts: 5975
01 Sep 2013 07:14 PM
for Y,Q in pairs(shared.Tributes) do
if Q.Character:findFirstChild("Humanoid") then
Q.Character.Humanoid.WalkSpeed = 12
end
if GamePassService:PlayerHasPass(player, 11573874) then
Copy=game.Lighting.Gamepass.Bottle:clone()
Copy.Parent = player.Backpack
end
end
end
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
01 Sep 2013 07:15 PM
That wouldn't work, LaPWn.
Report Abuse
Trello is not online. Trello
Joined: 19 Feb 2010
Total Posts: 261
01 Sep 2013 07:20 PM
i've tried knightmare's and soquick's multiple times, but it isn't working
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