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

Previous Thread :: Next Thread 
Sinblade is not online. Sinblade
Joined: 14 Aug 2010
Total Posts: 2782
25 Sep 2014 06:27 PM
local id = 179536970
local market = game:GetService("MarketplaceService")
game.Player.PlayerAdded:connect(function(player)
if game:GetService("MarketplaceService"):PlayerHasPass(player, id) then
player.Character.Humanoid.Walkspeed = 32
else
print("Player doesn't have pass.")
end
end)

No output, in a serverscript
Report Abuse
VisualGraphics is not online. VisualGraphics
Joined: 26 Nov 2010
Total Posts: 6515
25 Sep 2014 06:31 PM
local id = 179536970
local player = game.Players.LocalPlayer
local market = game:GetService("MarketplaceService")

game.Player.PlayerAdded:connect(function(player)
local character = player.Parent
local humanoid = character:FindFirstChild("Humanoid")
if market:PlayerHasPass(player, id) then
humanoid.WalkSpeed = 32
else
print("Player doesn't have pass.")
end
end)
Report Abuse
Sinblade is not online. Sinblade
Joined: 14 Aug 2010
Total Posts: 2782
25 Sep 2014 06:42 PM
still nope, and yes i did put it into a localscript.
Report Abuse
Sinblade is not online. Sinblade
Joined: 14 Aug 2010
Total Posts: 2782
25 Sep 2014 07:34 PM
Anybody else?
Report Abuse
Rapster2 is not online. Rapster2
Joined: 16 Oct 2009
Total Posts: 1865
25 Sep 2014 07:40 PM
local id = 179536970
local passService = game:GetService("GamePassService")

game.Players.PlayerAdded:connect(function(player)
if passService:PlayerHasPass(player,id) then
player.CharacterAdded:connect(function(char)
local humanoid = char:FindFirstChild("Humanoid")
if humanoid then
humanoid.WalkSpeed = 32
end
end)
else
print("Player doesn't have pass")
end
end)


You were using MarketplaceService when you should have been using GamePassService


If it weren't for attorneys, we wouldn't need attorneys.
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
25 Sep 2014 07:41 PM
Read this line carefully;

game.Player.PlayerAdded:connect(function(player)


Now, please, facetrain.
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
25 Sep 2014 07:42 PM
local id = 179536970

game.Players.PlayerAdded:connect(function(player)
wait(1)
if game:GetService('GamePassService'):PlayerHasPass(player, id) then
player.Character.Humanoid.Walkspeed = 32
else
print("Player doesn't have pass.")
end end)
Report Abuse
Sinblade is not online. Sinblade
Joined: 14 Aug 2010
Total Posts: 2782
25 Sep 2014 08:32 PM
None of these seem to work when I test them, yet there is still no output.
Report Abuse
Rapster2 is not online. Rapster2
Joined: 16 Oct 2009
Total Posts: 1865
25 Sep 2014 08:55 PM
Try my code in a regular Script.


If it weren't for attorneys, we wouldn't need attorneys.
Report Abuse
Sinblade is not online. Sinblade
Joined: 14 Aug 2010
Total Posts: 2782
25 Sep 2014 09:00 PM
I have.
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
26 Sep 2014 03:47 PM
Perhaps this:

local id = 179536970
local passService = game:GetService("GamePassService")

game.Players.PlayerAdded:connect(function(player)
if passService:PlayerHasPass(player,id) then
player.CharacterAdded:connect(function(char)
local humanoid = char:WaitForChild("Humanoid")
humanoid.WalkSpeed = 32
end)
else
print("Player doesn't have pass")
end
end)
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