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: Not working, help?

Previous Thread :: Next Thread 
badfitz99 is not online. badfitz99
Joined: 01 May 2010
Total Posts: 5854
16 May 2014 09:56 AM
local open2 = script.Parent.Activation.On2.Value

script.Parent.Activation.ClickDetector.MouseClick:connect(function()
open2 = true
wait(5)
open2 = false
end)

Be polite, be professional, but have a plan to brutally mutilate everyone you meet with a rusty spoon.
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
16 May 2014 09:57 AM
local open2 = script.Parent.Activation.On2.Value

script.Parent.Activation.MouseClick:connect(function() --You don't mouseclick on a clickdetector
open2 = true
wait(5)
open2 = false
end)

c(•ᴗ • c ) c( • ᴗ • )ᴐ ( ᴐ • ᴗ•)ᴐ GUEST DANCE
Report Abuse
badfitz99 is not online. badfitz99
Joined: 01 May 2010
Total Posts: 5854
16 May 2014 10:02 AM
Still won't work.

Be polite, be professional, but have a plan to brutally mutilate everyone you meet with a rusty spoon.
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
16 May 2014 10:03 AM
Is activation a part?

c(•ᴗ • c ) c( • ᴗ • )ᴐ ( ᴐ • ᴗ•)ᴐ GUEST DANCE
Report Abuse
badfitz99 is not online. badfitz99
Joined: 01 May 2010
Total Posts: 5854
16 May 2014 10:04 AM
yes

Be polite, be professional, but have a plan to brutally mutilate everyone you meet with a rusty spoon.
Report Abuse
badfitz99 is not online. badfitz99
Joined: 01 May 2010
Total Posts: 5854
16 May 2014 10:12 AM
Activation is a part, the value is there (it's a bool value) and it doesn't change to true onclick

Be polite, be professional, but have a plan to brutally mutilate everyone you meet with a rusty spoon.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
16 May 2014 10:46 AM
lol,your setting the variable open2 to true,not the value..

your REASSIGNING THE VARIABLE..

--instead, reference to the OBJECT

local open2 = script.Parent.Activation.On2

script.Parent.Activation.ClickDetector.MouseClick:connect(function()
open2.Value = true
wait(5)
open2.Value = false
end)
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
16 May 2014 10:47 AM
@Island
You don't click on the clickdetector itself.

local open2 = script.Parent.Activation.On2

script.Parent.Activation.MouseClick:connect(function() --You don't mouseclick on a clickdetector
open2.Value = true
wait(5)
open2.Value = false
end)


c(•ᴗ • c ) c( • ᴗ • )ᴐ ( ᴐ • ᴗ•)ᴐ GUEST DANCE
Report Abuse
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
16 May 2014 10:48 AM
@Devious, yes you do.

MouseClick is an event of clickdetector. Otherwise clickdetectors would be useless.
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
16 May 2014 10:49 AM
@Devious The ClickDetector object detects clicks on the brick, so yes, you do need the ClickDetector.

Here's my siggy... Done.
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
16 May 2014 10:50 AM
Damn ninja'd... :P

Here's my siggy... Done.
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
16 May 2014 10:52 AM
@Ultra
I meant that you don't do ClickDetector.MouseClick

c(•ᴗ • c ) c( • ᴗ • )ᴐ ( ᴐ • ᴗ•)ᴐ GUEST DANCE
Report Abuse
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
16 May 2014 10:54 AM
@Devious, You do though.

MouseClick
Description Fired after the ClickDetector's parent is clicked.
Member of: ClickDetector

MouseClick is an event in clickdetector - therefore you have to do ClickDetector.MouseClick.
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
16 May 2014 10:55 AM
@Ultraw
And you also do TouchInterest.Touched

[/sarcasm]

c(•ᴗ • c ) c( • ᴗ • )ᴐ ( ᴐ • ᴗ•)ᴐ GUEST DANCE
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
16 May 2014 10:56 AM
Excuse me while i stick a toothpick under my nail and then kick a wall.

c(•ᴗ • c ) c( • ᴗ • )ᴐ ( ᴐ • ᴗ•)ᴐ GUEST DANCE
Report Abuse
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
16 May 2014 11:00 AM
Are you saying you can do mouseclick straight from the part as long as there is a ClickDetector?
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
16 May 2014 11:01 AM
Forget what I said, I haven't used clickdetectors in forever.

c(•ᴗ • c ) c( • ᴗ • )ᴐ ( ᴐ • ᴗ•)ᴐ GUEST DANCE
Report Abuse
Megadragon2469 is not online. Megadragon2469
Joined: 23 May 2009
Total Posts: 14655
16 May 2014 11:02 AM
http://wiki.roblox.com/index.php/RBX.lua.ClickDetector_(Object)

Ultra he's right
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
16 May 2014 11:04 AM
local CD = script.Parent
local function onMouseClick(Player)
local Brick = CD.Parent
if Brick:IsA("BasePart") then
Brick.BrickColor = Player.TeamColor
end
end
CD.MouseClick:connect(onMouseClick)

says you gotta do it via the clickdetector..

go ahead,try to say Workspace.Part.MouseClick:connect(function() end)
Report Abuse
Megadragon2469 is not online. Megadragon2469
Joined: 23 May 2009
Total Posts: 14655
16 May 2014 11:06 AM
Woops I didn't notice the script was IN the clickdetector haha

sorry my bad :3
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