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: Can Someone Help?

Previous Thread :: Next Thread 
wsd906 is not online. wsd906
Joined: 27 Jan 2009
Total Posts: 9880
06 Aug 2011 12:24 AM
button.MouseButton1Down:connect(function()
if game.Players:GetPlayerFromCharacter(char).PlayerGui.MainList.Frame2.Visible == false then
game.Players:GetPlayerFromCharacter(char).PlayerGui.Mainlist.Frame2.Visible = true
end
end


Alot of things are wrong, can you tell me what I need to change? And its a GUI button Local Script
Report Abuse
Roundel is not online. Roundel
Joined: 20 Mar 2010
Total Posts: 469
06 Aug 2011 12:30 AM
You haven't defined char, try this:


button.MouseButton1Down:connect(function()
if game.Players.LocalPlayer.PlayerGui.MainList.Frame2.Visible == false then
game.Players.LocalPlayer.PlayerGui.Mainlist.Frame2.Visible = true
end
end
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
06 Aug 2011 12:31 AM
He neither defined 'button'.
Report Abuse
Roundel is not online. Roundel
Joined: 20 Mar 2010
Total Posts: 469
06 Aug 2011 12:32 AM
Oh true, I didn't even notice...

I'm going to go ahead and stop posting here, I make too many obvious mistakes Dx
Report Abuse
wsd906 is not online. wsd906
Joined: 27 Jan 2009
Total Posts: 9880
06 Aug 2011 12:37 AM
Cant I just put "local button" at the start of the script to define it?
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
06 Aug 2011 12:39 AM
script.Parent.MouseButton1Down:connect(function() -- I guess this script is inside the button.
local Frame2 = game.Players.LocalPlayer.PlayerGui.MainList.Frame
Frame2.Visible = not Frame2.Visible
end
Report Abuse
wsd906 is not online. wsd906
Joined: 27 Jan 2009
Total Posts: 9880
06 Aug 2011 12:42 AM
I dont think thats right.

Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
06 Aug 2011 12:44 AM
Why not? :3
Report Abuse
wsd906 is not online. wsd906
Joined: 27 Jan 2009
Total Posts: 9880
06 Aug 2011 12:45 AM
Lemme test it then.
Report Abuse
wsd906 is not online. wsd906
Joined: 27 Jan 2009
Total Posts: 9880
06 Aug 2011 12:49 AM
Nope, Doesnt work. Btw, this is in Frame, not Frame2
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
06 Aug 2011 12:50 AM
Are you using a LocalScript or a normal script?
Report Abuse
wsd906 is not online. wsd906
Joined: 27 Jan 2009
Total Posts: 9880
06 Aug 2011 12:51 AM
Normal, should I change to Local?
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
06 Aug 2011 12:51 AM
Yes :3
Report Abuse
wsd906 is not online. wsd906
Joined: 27 Jan 2009
Total Posts: 9880
06 Aug 2011 12:53 AM
Changed, Still doesnt work
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
06 Aug 2011 12:54 AM
Is it inside the button?
Report Abuse
wsd906 is not online. wsd906
Joined: 27 Jan 2009
Total Posts: 9880
06 Aug 2011 12:54 AM
Of Course.
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
06 Aug 2011 12:56 AM
Then it should work ._.
Report Abuse
Roundel is not online. Roundel
Joined: 20 Mar 2010
Total Posts: 469
06 Aug 2011 12:57 AM
No output?
Report Abuse
wsd906 is not online. wsd906
Joined: 27 Jan 2009
Total Posts: 9880
06 Aug 2011 12:59 AM
There are 2 frames

Its in the first one

Is that a problem?
Report Abuse
wsd906 is not online. wsd906
Joined: 27 Jan 2009
Total Posts: 9880
06 Aug 2011 01:05 AM
Here is a script I have in my place that might interferes, it activates Screen GUI (Frame 1 and 2 are in it)

function onTouched(hit)
local human = hit.Parent:FindFirstChild("Humanoid")
if (human == nil) then return end
local char = hit.Parent
if game.Players:GetPlayerFromCharacter(char).PlayerGui.ScreenGui.Frame.Visible == false then
game.Players:GetPlayerFromCharacter(char).PlayerGui.ScreenGui.Frame.Visible = true
end
end
script.Parent.Touched:connect(onTouched)


When I test it, the first frame loads, but when I click the button, the second one doesnt.
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