Roaf99
|
  |
| Joined: 02 Nov 2014 |
| Total Posts: 672 |
|
|
| 06 Sep 2015 11:19 AM |
local passid = 293526977 local tools = {"Knife"} local GamePassService = !!!!!!!!Game!!!!!!!!:GetService("GamePassService") game.Players.PlayerAdded:connect(function(player) repeat wait(0) until player.Backpack repeat wait(0) until player.StarterGear if GamePassService:PlayerHasPass(player, passid) then for i = 1,#tools do game.Lighting.Tools:FindFirstChild(tools[i]):Clone().Parent = player.Backpack game.Lighting.Tools:FindFirstChild(tools[i]):Clone().Parent = player.StarterGear end end end)
This is supposed to work, i did everything the turtorial said and the word inbetween the !!!!! is underlined in the accual script. ( i added those in to show u)
Tnx guys! |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2015 11:23 AM |
| PlayerHasAsset is better cuz PlayerHasPass caches |
|
|
| Report Abuse |
|
|
Roaf99
|
  |
| Joined: 02 Nov 2014 |
| Total Posts: 672 |
|
| |
|
|
| 06 Sep 2015 11:30 AM |
| Like it's not the reason why your script doesn't work, but playerhas asset is better. |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2015 11:30 AM |
local GamePassService = !!!!!!!!Game!!!!!!!!:GetService("GamePassService")
wat |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2015 11:35 AM |
Sorry it's player owns asset
local gamepass = 293526977 game.Players.PlayerAdded:connect(function(plr) if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr, gamepass) repeat wait(0) until player.Backpack repeat wait(0) until player.StarterGear for i = 1,#tools do game.Lighting.Tools:FindFirstChild(tools[i]):Clone().Parent = player.Backpack game.Lighting.Tools:FindFirstChild(tools[i]):Clone().Parent = player.StarterGear else print(plr.Name .. " doesn't own the Midnight Shades") end end) |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2015 11:36 AM |
| Oops remove that's else statement |
|
|
| Report Abuse |
|
|
AkaLua
|
  |
| Joined: 27 Jul 2012 |
| Total Posts: 526 |
|
|
| 06 Sep 2015 11:37 AM |
Is it a blue underline? If so, it's because 'Game' doesn't exist unless you assign it previously
use
local GamePassService = game:GetService("GamePassService")
That may fix it, I'm not sure. If not, check output and post it here.
Personally, I'd do this (untested)
local passid = 293526977 local tools = {"Knife"}
game.Players.PlayerAdded:connect(function(player) local stp = player:WaitForChild("StarterGear") local bcp = player:WaitForChild("Backpack") if game:GetService("MarketplaceService"):PlayerOwnsAsset(player,passid) local ltools = game.Lighting:WaitForChild("Tools") for i = 1,tools do if game.Lighting:FindFirstChild(tools[i]) then ltools:FindFirstChild(tools[i]):clone().Parent = stp ltools:FindFirstChild(tools[i]):clone().Parent = bcp end end
|
|
|
| Report Abuse |
|
|