|
| 20 May 2017 12:39 PM |
So, I made a local script that, once a player sits in his ship, clones a billboardgui inside an "enemies folder" for every ship there is in the workspace, and change the Adornee of every billboard to the respective ship. Everything works with that.
Now, inside the billboard there is a button with this local script:
script.Parent.MouseButton1Click:connect(function() print("yea you clicked the billboard") end
The problem is that it doesn't print anything, so I suppose the Click function does not connect. What am I doing wrong? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 20 May 2017 01:18 PM |
LocalScripts only run in Workspace when a descendant of a character.
|
|
|
| Report Abuse |
|
|
|
| 20 May 2017 01:19 PM |
| The billboards are inside a folder inside PlayerGui, so the local script is inside the player alredy. |
|
|
| Report Abuse |
|
|
|
| 20 May 2017 01:20 PM |
You also don't have a closing parenthesis for the `connect` function call. If that isn't the problem then I don't know what is.
|
|
|
| Report Abuse |
|
|
|
| 20 May 2017 01:22 PM |
| Eh, I just forgot to copy it here, I really don't get what's wrong, the active property is also set on true inside the billboard... |
|
|
| Report Abuse |
|
|
|
| 20 May 2017 01:38 PM |
i'm pretty sure mousebutton1click doesn't work on billboard gui's but i may be wrong
|
|
|
| Report Abuse |
|
|
|
| 20 May 2017 01:41 PM |
It doesn't. It only works on GuiButtons.
|
|
|
| Report Abuse |
|
|
|
| 20 May 2017 01:46 PM |
Doesn't work on Billboard gui's, also you forgot to close '('
|
|
|
| Report Abuse |
|
|
|
| 20 May 2017 01:47 PM |
Someone hasn't read the thread.
|
|
|
| Report Abuse |
|
|
|
| 20 May 2017 01:52 PM |
I managed to make it work. It didn't work because the billboard must be a direct children of the playergui, and not a children of a children(My billboards were inside a folder). However, even if it works, sometimes when you hover on them with the mouse, they don't get selected and you can't click on them.
Roblox should really fix that, I have to find another solution because that's a problem. |
|
|
| Report Abuse |
|
|