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: MouseButton1Down is not a valid member of Part

Previous Thread :: Next Thread 
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
24 Oct 2014 03:53 PM
I posted a thread before like this but I messed up on it, here's the actual one



function onClick()
local weGui = Instance.new("SurfaceGui",script.Parent)
weGui.Face = "Top"
local teGui = Instance.new("TextLabel",script.Parent.SurfaceGui)
teGui.BackgroundTransparency = 1
teGui.Position = UDim2.new(0.34, 0, 0.3, 0)
teGui.Size = UDim2.new(0, 250, 0, 100)
end

script.Parent.MouseButton1Down:connect(onClick)
Report Abuse
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
24 Oct 2014 04:05 PM
bump
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
24 Oct 2014 04:06 PM
MouseButton1Down is for Gui's...
Report Abuse
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
24 Oct 2014 04:06 PM
@Oscar
That explains it I guess :L
What would I use for a part?
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
24 Oct 2014 04:08 PM
Insert a ClickDetector into the part and use MouseClick instead of MouseButton1Down
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
24 Oct 2014 04:09 PM
Forgot to mention, put the script in the ClickDetector
Report Abuse
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
24 Oct 2014 04:20 PM
@Oscar

Doesn't work, I made sure to change the parents and everything.
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
24 Oct 2014 04:21 PM
Can I see the script now?
Report Abuse
Tomarty is not online. Tomarty
Joined: 08 Dec 2008
Total Posts: 591
24 Oct 2014 04:21 PM
use MouseClick instead of MouseButton1Down
Report Abuse
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
24 Oct 2014 04:22 PM
Fixed it, thanks
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
24 Oct 2014 04:22 PM
I told you to do that....
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