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 » Scripters
Home Search
 

Re: Script Not Working

Previous Thread :: Next Thread 
Devnxius is not online. 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 is not online. Devnxius
Joined: 24 May 2016
Total Posts: 254
05 Dec 2016 07:17 PM
b1


37,927
Report Abuse
Devnxius is not online. Devnxius
Joined: 24 May 2016
Total Posts: 254
05 Dec 2016 07:45 PM
Help please


37,942
Report Abuse
0supadude0 is not online. 0supadude0
Joined: 11 Aug 2010
Total Posts: 649
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 is not online. 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 is not online. Devnxius
Joined: 24 May 2016
Total Posts: 254
10 Dec 2016 03:48 PM
help


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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