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: LocalScript Wont Work Please Look!

Previous Thread :: Next Thread 
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
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
Preponderance is not online. Preponderance
Joined: 30 Sep 2009
Total Posts: 21293
03 Feb 2014 03:14 PM
Is this supposed to be a tool?
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
03 Feb 2014 03:15 PM
No handles are also in hats
Report Abuse
Preponderance is not online. Preponderance
Joined: 30 Sep 2009
Total Posts: 21293
03 Feb 2014 03:17 PM
I know, was just trying to make sure xD
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
03 Feb 2014 03:25 PM
Bump. Please help!
Report Abuse
CoolioTree is not online. CoolioTree
Joined: 26 Dec 2012
Total Posts: 2509
03 Feb 2014 03:26 PM
I think it's Print("haiii ;)")?
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
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 is not online. 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 is not online. 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
CoolioTree is not online. CoolioTree
Joined: 26 Dec 2012
Total Posts: 2509
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
Preponderance is not online. Preponderance
Joined: 30 Sep 2009
Total Posts: 21293
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
david1234501 is not online. david1234501
Joined: 04 Oct 2008
Total Posts: 737
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 is not online. 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
david1234501 is not online. david1234501
Joined: 04 Oct 2008
Total Posts: 737
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 is not online. 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
DrRandomous is not online. DrRandomous
Joined: 25 Mar 2011
Total Posts: 1702
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
DrRandomous is not online. DrRandomous
Joined: 25 Mar 2011
Total Posts: 1702
03 Feb 2014 04:19 PM
http://wiki.roblox.com/index.php?title=MouseClick_(Event)
More information there. ^^

-DrRandomous :p | Pastebin (/RHqT7nvi)
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
03 Feb 2014 07:29 PM
Nope D;
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
03 Feb 2014 07:36 PM
got it working thanks for all your help guys!
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