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: Correct this script please

Previous Thread :: Next Thread 
DemonZombieToy is not online. DemonZombieToy
Joined: 03 Feb 2014
Total Posts: 7
04 Nov 2014 05:16 PM
Please tell me if you see anything wrong and a won't work without gamepass please


local player = script.Parent.Parent.Parent.Parent.Parent.Parent
local id = 169221205

script.Parent.MouseButton1Down:connect(function()
print("Clicked")
if game:GetService("GamePassService"):PlayerHasPass(player, id) then
for a,b in pairs(script.Parent:GetChildren()) do
if b:IsA("HopperBin") or b:IsA("Tool") then
local tool = b:Clone()
tool.Parent = player.Backpack
end
end
print("Works")
wait()
script.Parent.Parent.Parent.Parent:Destroy()
player.Character:MoveTo(Vector3.new(100,100,100))
end
end)
Report Abuse
xXFIREFACEXx is not online. xXFIREFACEXx
Joined: 18 Jul 2012
Total Posts: 1427
04 Nov 2014 05:21 PM
Are you receiving any error messages?
Report Abuse
aerogod is not online. aerogod
Joined: 28 Jun 2011
Total Posts: 2188
04 Nov 2014 05:26 PM
Tell me what your trying to do and I might be able to fix it.
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
04 Nov 2014 05:29 PM
This should be in a local script and then you can replace your player reference with this:
player = game.Players.LocalPlayer
Report Abuse
shooter06 is not online. shooter06
Joined: 13 Jan 2011
Total Posts: 7443
04 Nov 2014 05:31 PM
obviously a troll


print("Hello World!")
Report Abuse
DemonZombieToy is not online. DemonZombieToy
Joined: 03 Feb 2014
Total Posts: 7
04 Nov 2014 05:32 PM
I'm trying to put this under a button in a Screen GUI so they have to have a Game Pass to click the button
Report Abuse
aerogod is not online. aerogod
Joined: 28 Jun 2011
Total Posts: 2188
04 Nov 2014 05:38 PM
mkay, so I tried my best, I couldn't solve it. Good luck.
Report Abuse
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
04 Nov 2014 06:05 PM
try changing id = number to id = "number"

gr8 b8 on a sl8 pl8 of f8 m8 | ( ͡° ͜ʖ ͡°)
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
04 Nov 2014 06:26 PM
No the id should be a number

Everything looks right so as long as your hierarchy is correct it should work. If it isn't then you probably have an error there. Try using ROBLOX's remote error monitoring system. It could be possible that ROBLOX just hasn't processed your ownership of the gamepass yet.w
Report Abuse
DemonZombieToy is not online. DemonZombieToy
Joined: 03 Feb 2014
Total Posts: 7
05 Nov 2014 11:48 AM
The problem i'm having is that it gives the tools even if they don't have the gamepass. I'm trying to make it where it won't give them anything if they don't have the gamepass.
Report Abuse
DemonZombieToy is not online. DemonZombieToy
Joined: 03 Feb 2014
Total Posts: 7
05 Nov 2014 11:50 AM
What do you mean by hierarchy? I think I need to connect this script to the assign weapon script somehow. But I don't know how.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
05 Nov 2014 11:55 AM
'Try using ROBLOX's remote error monitoring system'

You know there is a built in output / script runner in game if you own the place, right?
Report Abuse
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
05 Nov 2014 02:42 PM
You know there is a built in output / script runner in game if you own the place, right? [2]

gr8 b8 on a sl8 pl8 of f8 m8 | ( ͡° ͜ʖ ͡°)
Report Abuse
DemonZombieToy is not online. DemonZombieToy
Joined: 03 Feb 2014
Total Posts: 7
06 Nov 2014 10:20 AM
I tried that already. But since it gives me the tools regardless of whether I have the gamepass or not. The output doesnt tell me anything
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