skript92
|
  |
| Joined: 23 Jul 2013 |
| Total Posts: 1430 |
|
|
| 18 Aug 2014 02:06 PM |
How can you do that?
Gimme Posts :D |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2014 02:08 PM |
GamePassService.
http://wiki.roblox.com/index.php?title=API:Class/GamePassService http://wiki.roblox.com/index.php?title=API:Class/GamePassService/PlayerHasPass
Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson |
|
|
| Report Abuse |
|
|
skript92
|
  |
| Joined: 23 Jul 2013 |
| Total Posts: 1430 |
|
|
| 18 Aug 2014 02:08 PM |
You again xD
Gimme Posts :D |
|
|
| Report Abuse |
|
|
skript92
|
  |
| Joined: 23 Jul 2013 |
| Total Posts: 1430 |
|
|
| 18 Aug 2014 02:17 PM |
if game:GetService(GamePassService):PlayerHasPass(player,id) then
21:16:42.336 - Argument 1 missing or nil
Gimme Posts :D |
|
|
| Report Abuse |
|
|
skript92
|
  |
| Joined: 23 Jul 2013 |
| Total Posts: 1430 |
|
|
| 18 Aug 2014 02:20 PM |
Helpz blease.
Gimme Posts :D |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2014 02:22 PM |
That means that you never set the "player" variable. Would you care to post your entire script?
Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson |
|
|
| Report Abuse |
|
|
skript92
|
  |
| Joined: 23 Jul 2013 |
| Total Posts: 1430 |
|
|
| 18 Aug 2014 02:24 PM |
player = game.Players.LocalPlayer char = player.Character m = player:GetMouse() id = 153633139 -- Put your gamepass ID, (the last numbers) -- Put za tool in ServerStorage
m.KeyDown:connect(function(key) if key:lower() == "q" then for i,v in pairs (game.ServerStorage:GetChildren()) do if game:GetService(GamePassService):PlayerHasPassid(player,id) then if v:IsA("Tool") then clone = v:clone() clone.Parent = game.Workspace clone.Handle.CFrame = char.Torso.CFrame+Vector3.new(5,1,math.random(1,3)) script.Disabled = true end else print(player.Name.." Tried to use a gamepass feautre but he doesn't own it.") end end end end)
Gimme Posts :D |
|
|
| Report Abuse |
|
|
skript92
|
  |
| Joined: 23 Jul 2013 |
| Total Posts: 1430 |
|
| |
|
|
| 18 Aug 2014 02:30 PM |
You can also use:
game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, ID) |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2014 02:32 PM |
LocalPlayer can only be used from LocalScripts. Provided you are using one, you cannot access ServerStorage (and I'm pretty sure GamePassService won't work). If you're not, you can't use LocalPlayer. Other than that, your script should work fine?
Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson |
|
|
| Report Abuse |
|
|
skript92
|
  |
| Joined: 23 Jul 2013 |
| Total Posts: 1430 |
|
|
| 18 Aug 2014 02:37 PM |
game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, ID) WORKS!
Gimme Posts :D |
|
|
| Report Abuse |
|
|
skript92
|
  |
| Joined: 23 Jul 2013 |
| Total Posts: 1430 |
|
|
| 18 Aug 2014 02:54 PM |
server storage isn't a valid member of DataModel D: Gimme Posts :D |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2014 02:55 PM |
That means that you are using a LocalScript. ServerStorage is called ServerStorage for a reason; it is for the server, and is not replicated to the client. In other words, LocalScripts can't use it. Try a Script.
Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2014 05:21 PM |
| Move items into ReplicatedStorage. Then Local scripts and Server scripts can get to them. |
|
|
| Report Abuse |
|
|