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: How to get a Billboard Gui to detect mouse events?

Previous Thread :: Next Thread 
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
23 Feb 2013 02:00 AM
"Note: The BillboardGui's Active property must be set to true before mouse events in child objects work. It is set to false by default." - http://wiki.roblox.com/index.php/RBX.lua.BillboardGui_(Object)


--[[
Not important
]]--

local billgui = Instance.new("BillboardGui", character.Head)
billgui.Active = true
--[[
Not important
]]--

local frame = Instance.new("Frame", billgui)
frame.Size = UDim2.new(3, 0, 1.75, 0)
frame.Position = UDim2.new(-1, 0, -0.6, 0)
frame.BackgroundColor3 = Color3.new(0, 0.5, 0)

local text = Instance.new("TextButton", frame)
text.Position = UDim2.new(0.125, 0, 0.125, 0)
text.Size = UDim2.new(0.75, 0, 0.75, 0)
--[[
Not important
]]--
text.Text = "Yello"



text.MouseButton1Down:connect(function()
    print("Hi")
end)

Title, help?
Report Abuse
Positr0n is not online. Positr0n
Joined: 26 Nov 2011
Total Posts: 80
23 Feb 2013 02:03 AM
MouseButton1Click, not MouseButton1Down.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
23 Feb 2013 11:21 AM
That didn't work. Using this, still not giving response or output:

pcall(function() Game.Players.CodyTheBuildingKid.Character.Head.BillboardGui:Destroy() end)
wait(2)

local player = Game:GetService("Players").CodyTheBuildingKid
local character = player.Character

local billgui = Instance.new("BillboardGui", character.Head)
billgui.Active = true
billgui.Adornee = character.Head
billgui.Size = UDim2.new(6, 0, 2.5, 0)
billgui.StudsOffset = Vector3.new(0, 3, 0)

local frame = Instance.new("Frame", billgui)
frame.Size = UDim2.new(3, 0, 1.75, 0)
frame.Position = UDim2.new(-1, 0, -0.6, 0)
frame.BackgroundColor3 = Color3.new(0, 0.5, 0)

local text = Instance.new("TextButton", frame)
text.Position = UDim2.new(0.125, 0, 0.125, 0)
text.Size = UDim2.new(0.75, 0, 0.75, 0)
text.BackgroundColor3 = Color3.new(0,0,0.5)
text.TextColor3 = Color3.new(1,1,1)
text.Font = "Arial"
text.FontSize = "Size36"
text.TextScaled = true
text.Text = "teehee"

text.MouseButton1Click:connect(function()
print("Hi")
end)
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
23 Feb 2013 12:02 PM
Bump
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
23 Feb 2013 12:39 PM
Bump
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
23 Feb 2013 01:03 PM
Bump

Help please
Report Abuse
xPRESIDENTx is not online. xPRESIDENTx
Joined: 10 Jun 2011
Total Posts: 815
23 Feb 2013 01:07 PM
billboardbutton = blah blah

mouse = player:GetMouse()

mouse.MouseButton1Click(function()
print("Hi")
end
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
23 Feb 2013 01:09 PM
13:08:28.031 - MouseButton1Click is not a valid member of PlayerMouse
13:08:28.031 - Script "Workspace.Test", Line 30
13:08:28.032 - stack end


13:09:11.962 - MouseButton1Down is not a valid member of PlayerMouse
13:09:11.963 - Script "Workspace.Test", Line 30
13:09:11.965 - stack end
Report Abuse
xPRESIDENTx is not online. xPRESIDENTx
Joined: 10 Jun 2011
Total Posts: 815
23 Feb 2013 01:11 PM
gui = blahblah

gui.MouseButton1Click:connect(function()
print("Button1 click.")
end)


I messed up the first time lol srry.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
23 Feb 2013 01:11 PM
It's mouse.Button1Down/Click.

That is not what I want, I want it on the gui, not just anywhere
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
23 Feb 2013 01:12 PM
That has no response, I've already done that.
Report Abuse
xPRESIDENTx is not online. xPRESIDENTx
Joined: 10 Jun 2011
Total Posts: 815
23 Feb 2013 01:12 PM
ok, do MouseButton1Up, not down its just more profesional
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
23 Feb 2013 01:13 PM
That would still be the same thing as MouseButton1Down, it is giving no response.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
23 Feb 2013 01:41 PM
Bump
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
23 Feb 2013 02:06 PM
Bump
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
23 Feb 2013 02:12 PM
Noobs above.
Put it in the PlayerGui to get mouse functions to work.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
23 Feb 2013 02:14 PM
qq
That means no one can see it.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
23 Feb 2013 02:16 PM
Okay let me explain it to you.

1) You make it so that the BillBoardGui is in everyones PlayerGui.
2) You set the adornee to the desired part.
3) ?????
4) profit
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
23 Feb 2013 02:20 PM
Yea I knew about that, I was hoping there would be an easier way.
Okay, I'm on it.
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