|
| 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 |
|
|
|
| 22 Aug 2013 06:46 PM |
Add the argument 'plr' in the parameters of script.Parent.MouseButton1Down:connect(function()
|
|
|
| Report Abuse |
|
|
|
| 22 Aug 2013 06:49 PM |
I did this but it did'nt work?
script.Parent.MouseButton1Down:connect(function(plr) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
|
| 22 Aug 2013 08:15 PM |
| You also never defined 'plr.' |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Aug 2013 09:00 PM |
| Bump I did in the function |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 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 |
|
|
| |
|