Devnxius
|
  |
| Joined: 24 May 2016 |
| Total Posts: 254 |
|
|
| 05 Dec 2016 07:11 PM |
hello. My script is not working, as it should be.
script.Parent.Touched:connect(function(part) if part.Parent:FindFirstChild("Humanoid") then if game:GetService('MarketplaceService'):PlayerOwnsAsset(game.Players:GetPlayerFromCharacter(part.Parent), 469512961) then script.Parent:Remove() end end end)
script.Parent.ClickDetector.MouseClick:connect(function(person) print(person.Name) if game:GetService('MarketplaceService'):PlayerOwnsAsset(person, 469512961) or person.Name:find("Player") then script.Parent.Parent = nil else print("Does not own!") script.Parent.Parent = nil end end)
It does print out Player name(Player1) and Does not own. Currently I am testing, but it should work, but it is not!
Please fix. Thanks!
37,927 |
|
|
| Report Abuse |
|
|
Devnxius
|
  |
| Joined: 24 May 2016 |
| Total Posts: 254 |
|
| |
|
Devnxius
|
  |
| Joined: 24 May 2016 |
| Total Posts: 254 |
|
| |
|
|
| 05 Dec 2016 08:05 PM |
script.Parent.ClickDetector.MouseClick:connect(function(person) print(person.Name) if game:GetService('MarketplaceService'):PlayerOwnsAsset(person, 469512961) or person.Name:sub(1,6) == "Player" then script.Parent.Parent = nil else print("Does not own!") script.Parent.Parent = nil end end)
|
|
|
| Report Abuse |
|
|
Devnxius
|
  |
| Joined: 24 May 2016 |
| Total Posts: 254 |
|
|
| 05 Dec 2016 09:01 PM |
No. Thats not what I need. The part does not get set to nil. That is the problem.
38,532 |
|
|
| Report Abuse |
|
|
Devnxius
|
  |
| Joined: 24 May 2016 |
| Total Posts: 254 |
|
| |
|