|
| 03 Feb 2014 03:13 PM |
local Handle = script.Parent
local Player = game.Players.LocalPlayer
function onClick() print'Called' Player.PlayerGui.Chat.Frame.Visible = true print'It Worked!' end
Handle.ClickDetector.MouseClick:connect(onClick)
Nothing appears in the output.
Please post if you have an answer!
|
|
|
| Report Abuse |
|
|
|
| 03 Feb 2014 03:14 PM |
| Is this supposed to be a tool? |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2014 03:15 PM |
| No handles are also in hats |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2014 03:17 PM |
| I know, was just trying to make sure xD |
|
|
| Report Abuse |
|
|
| |
|
|
| 03 Feb 2014 03:26 PM |
| I think it's Print("haiii ;)")? |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2014 03:27 PM |
| Listen, I came to scripting helpers so people can help me not to get off topic.. |
|
|
| Report Abuse |
|
|
domorox17
|
  |
| Joined: 06 Mar 2012 |
| Total Posts: 1710 |
|
|
| 03 Feb 2014 03:27 PM |
| What are ya trying to do with this. |
|
|
| Report Abuse |
|
|
crossbar
|
  |
| Joined: 08 Dec 2009 |
| Total Posts: 2817 |
|
|
| 03 Feb 2014 03:27 PM |
| Is the hat a model inserted into the game? |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2014 03:28 PM |
I'm not going off topic. I'm trying to help.
It's Print("Something here") instead of Print"imdum"
You don't deserve my help anyways. Get lost. |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2014 03:39 PM |
@Coolio
Either way is correct.
Let's try to help and be helped and not be rude guys :D |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2014 03:43 PM |
| Try putting the script in the click detector itself, and changing the connection to 'script.Parent.MouseClick:connect(onClick)'. That's what I usually do. If there is no error, that means the function isn't connecting. |
|
|
| Report Abuse |
|
|
crossbar
|
  |
| Joined: 08 Dec 2009 |
| Total Posts: 2817 |
|
|
| 03 Feb 2014 03:44 PM |
button = game.Workspace.Part1 ClickDet = game.Workspace.Part1:FindFirstChild("ClickDetector", true) frame = script.Parent Player = frame.Parent.Parent.Parent
function onClicked(mouse) Player:FindFirstChild("Frame", true).Visible = true end
ClickDet.MouseClick:connect(onClicked)
--Part1 is the part or "handle" (i'm not very good with making hats but i'm guessing that handle is a name for a part)...
--If this doesn't work check and see if your Frame Visible property is set to false. If it isn't then that may be your problem, you need to add some more information into the code. Also how small is this handle?? lol |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2014 03:44 PM |
local Handle = script.Parent.Parent
local Player = game.Players.LocalPlayer
function onClick() print'Called' Player.PlayerGui.Chat.Frame.Visible = true print'It Worked!' end
script.Parent.MouseClick:connect(onClick) |
|
|
| Report Abuse |
|
|
crossbar
|
  |
| Joined: 08 Dec 2009 |
| Total Posts: 2817 |
|
|
| 03 Feb 2014 03:48 PM |
| Also I thought MouseClick events can only be handled via. Script?? |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2014 04:18 PM |
Try to do this:
local Handle = script.Parent function onClick(Player_That_Clicked) print("Called") if Player_That_Clicked:findFirstChild("PlayerGui"):findFirstChild("Chat"):findFirstChild("Frame") then Player_ThatClicked.PlayerGui.Chat.Frame.Visible = true else print("not there") end print("It Worked!") end
Handle.ClickDetector.MouseClick:connect(onClick)
-DrRandomous :p | Pastebin (/RHqT7nvi) |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2014 04:19 PM |
http://wiki.roblox.com/index.php?title=MouseClick_(Event) More information there. ^^
-DrRandomous :p | Pastebin (/RHqT7nvi) |
|
|
| Report Abuse |
|
|
| |
|
|
| 03 Feb 2014 07:36 PM |
| got it working thanks for all your help guys! |
|
|
| Report Abuse |
|
|