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: Why won't this work?

Previous Thread :: Next Thread 
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
22 Aug 2013 06:45 PM
Trying to make it change if the player have the gamepass.


Tab = script.Parent.Parent
local passId = 122812719

function isAuthenticated(player)
return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end

script.Parent.MouseButton1Down:connect(function()
print("Button1 Click")
if Tab.Data.Value == "Weapons" then
if isAuthenticated(plr) then
script.Parent.Parent.Parent.SBox.Box1.Visible = true
script.Parent.Parent.Parent.SBox.Visible = true
script.Parent.Parent.Parent.WBox.Visible = false
Tab.Data.Value = "Premium"
elseif Tab.Data.Value == "Magic" then
if isAuthenticated(plr) then
script.Parent.Parent.Parent.SBox.Box1.Visible = true
script.Parent.Parent.Parent.SBox.Visible = true
script.Parent.Parent.Parent.MBox.Visible = false
Tab.Data.Value = "Premium"
end
end
end
end)
Report Abuse
stephen1182 is not online. stephen1182
Joined: 31 Aug 2010
Total Posts: 4003
22 Aug 2013 06:46 PM
Add the argument 'plr' in the parameters of script.Parent.MouseButton1Down:connect(function()
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
22 Aug 2013 06:49 PM
I did this but it did'nt work?

script.Parent.MouseButton1Down:connect(function(plr)
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
22 Aug 2013 07:03 PM
Bump
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
22 Aug 2013 07:17 PM
Anyone?
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
22 Aug 2013 08:05 PM
Bump
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
22 Aug 2013 08:14 PM
What is 'tab'
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
22 Aug 2013 08:15 PM
You also never defined 'plr.'
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
22 Aug 2013 08:55 PM
What u mean defined plr?
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
22 Aug 2013 09:00 PM
Bump I did in the function
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
22 Aug 2013 09:04 PM
Bump
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
22 Aug 2013 09:20 PM
:.:
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
22 Aug 2013 10:10 PM
No help.Wow
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
22 Aug 2013 10:18 PM
script.Parent.MouseButton1Down:connect(function(plr) won't work. the MouseButton1Down event returns an X Y co-ordinate on the screen.
Report Abuse
EPICDUDE8283 is not online. EPICDUDE8283
Joined: 16 Apr 2012
Total Posts: 963
22 Aug 2013 10:25 PM
Bump
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