Talk:Making an onClicked script: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Randellman
No edit summary
>Pighead10
 
(10 intermediate revisions by 3 users not shown)
Line 20: Line 20:
I'm pretty sure you wanted the door to allow people to walk through it, and to turn invisible... The transparency should be changed to 1 (invisible) and the CanCollide should be FALSE. -- superfroggy
I'm pretty sure you wanted the door to allow people to walk through it, and to turn invisible... The transparency should be changed to 1 (invisible) and the CanCollide should be FALSE. -- superfroggy


== umm... ==
== Testing ==
whate the the script is a fake i did all things rite and it didint work
The script
betta fix that
<pre>
----
function onClicked()
--[[User:Randellman|Randellman]] 22:06, 7 August 2008 (CDT)randellman
  local x = (math.random(0,10) * 0.1)
  local y = (math.random(0,10) * 0.1)
  local z = (math.random(0,10) * 0.1)
  script.Parent.Color = Color3.new (x, y, z)
  end
 
  script.Parent.ClickDetector.MouseClick:connect(onClicked)
</pre>
works.  {{User:Mindraker/sig}} 07:57, 16 August 2008 (CDT)
 
This tutorial needs a better explanation than, "put stuff here".  An example would be helpful.  {{User:Mindraker/sig}} 09:48, 16 August 2008 (CDT)
 
These sort of pages need to be removed, this contains a lot of misleading information. I'm going to edit this one, as the wiki needs a Clicked tutorial if there isn't one already. --[[User:Pighead10|-pighead10]] 11:11, 23 December 2010 (UTC)
 
I've started changing it, but I had to go. I'll be back to edit the rest. --[[User:Pighead10|-pighead10]] 11:21, 23 December 2010 (UTC)
 
== This page needs to be removed ==
 
Yeah, this page needs to be removed and the article placed in Making a ClickDetector script, or making a MouseClick script.

Latest revision as of 21:48, 23 December 2010

Thanks man this helped me out alot with stuff. Could you tell me/us how to make it to wher you have a 2 bricks you hit one of them and it turns green and deletes the other brick then if you hit it again it makes it come back and the brick turns red again.?.?.


--Girashka

I NEED HELP!

I tried to make my script work but it's not working! what's wrongh with this script?:

door = script.Parent.Parent.Door function onClicked() door.Transparency = 0 door.CanCollide =true end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

I'm pretty sure you wanted the door to allow people to walk through it, and to turn invisible... The transparency should be changed to 1 (invisible) and the CanCollide should be FALSE. -- superfroggy

Testing

The script

function onClicked()
  	local x = (math.random(0,10) * 0.1)
  	local y = (math.random(0,10) * 0.1)
  	local z = (math.random(0,10) * 0.1)
  	script.Parent.Color = Color3.new (x, y, z)
  end
  
  script.Parent.ClickDetector.MouseClick:connect(onClicked)

works. MINDRAKER 07:57, 16 August 2008 (CDT)

This tutorial needs a better explanation than, "put stuff here". An example would be helpful. MINDRAKER 09:48, 16 August 2008 (CDT)

These sort of pages need to be removed, this contains a lot of misleading information. I'm going to edit this one, as the wiki needs a Clicked tutorial if there isn't one already. ---pighead10 11:11, 23 December 2010 (UTC)

I've started changing it, but I had to go. I'll be back to edit the rest. ---pighead10 11:21, 23 December 2010 (UTC)

This page needs to be removed

Yeah, this page needs to be removed and the article placed in Making a ClickDetector script, or making a MouseClick script.