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 » Club Houses » ROBLOX Talk
Home Search
 

Re: I'm that bad at scripting I can...

Previous Thread :: Next Thread 
Maltese202 is not online. Maltese202
Joined: 27 Jun 2012
Total Posts: 3474
02 Apr 2015 03:11 AM
only make a play audio script. LEGIT.
Report Abuse
PoulsenTheII is not online. PoulsenTheII
Joined: 05 Jul 2013
Total Posts: 5356
02 Apr 2015 03:12 AM
I can change a part's transparency and color on touch/click.
Report Abuse
Fazana is not online. Fazana
Joined: 21 Feb 2009
Total Posts: 28722
02 Apr 2015 03:13 AM
I can do a lot of things

~ I hope your day sucks. ~
Report Abuse
Maltese202 is not online. Maltese202
Joined: 27 Jun 2012
Total Posts: 3474
02 Apr 2015 03:19 AM
Do you do it like this:
b = game.Workspace.Brick

function OnClicked() -- Creates a Function

if b.Mouse1Button == False then -- Checking if clicked
wait(100) -- Making the script wait 100 seconds
b.Transparency = 1 -- Makes it transparent

if b.Mouse1Button == True then
wait()
b.Transparency = 1
end


-- Was this correcT?







Report Abuse
Xuvernitury is not online. Xuvernitury
Joined: 17 May 2009
Total Posts: 5760
02 Apr 2015 03:30 AM
That script is not connected to any function. it will not work...

And I only know how to print in the output :/
Report Abuse
Maltese202 is not online. Maltese202
Joined: 27 Jun 2012
Total Posts: 3474
02 Apr 2015 03:32 AM
So if I change Mouse1Button to onClicked will it work?
Report Abuse
Fazana is not online. Fazana
Joined: 21 Feb 2009
Total Posts: 28722
02 Apr 2015 03:33 AM
Remove the check for the mouse button, that's done when the function is called by the client connection.

In this case, it would be

script.Parent.ClickDetector.MouseClick:Connect(OnClicked)

Alternatively, you can change b to

b = script.Parent

~ I hope your day sucks. ~
Report Abuse
Maltese202 is not online. Maltese202
Joined: 27 Jun 2012
Total Posts: 3474
02 Apr 2015 03:34 AM
Oh, wow. I am learning new things on the wrong subforum. Tracking...
Report Abuse
Xuvernitury is not online. Xuvernitury
Joined: 17 May 2009
Total Posts: 5760
02 Apr 2015 03:37 AM
what I mean is, where is the :connect function in it?
Report Abuse
Fazana is not online. Fazana
Joined: 21 Feb 2009
Total Posts: 28722
02 Apr 2015 03:40 AM
To make it even fancier, instead of instantaneously disappearing, you can make the brick fade.

So, you do this:


switch = false

function(OnClicked)
if switch == false then
switch = true
script.Parent.CanCollide = false
else
switch = false
script.Parent.CanCollide = true
end

if switch == true then

while script.Parent.Transparency > 0 do
script.Parent.Transparency = script.Parent.Transparency - 0.1
end

else

while script.Parent.Transparency < 1 do
script.Parent.Transparency = script.Parent.Transparency + 0.1
end

end

end

script.Parent.ClickDetector.MouseClick:Connect(OnClicked)



It's not effecient, but it works lol


~ I hope your day sucks. ~
Report Abuse
Fazana is not online. Fazana
Joined: 21 Feb 2009
Total Posts: 28722
02 Apr 2015 03:41 AM
Ya that's a door lmaopiss

it also needs a clickdetector class inside the brick along with the script otherwise it won't work.

~ I hope your day sucks. ~
Report Abuse
Fazana is not online. Fazana
Joined: 21 Feb 2009
Total Posts: 28722
02 Apr 2015 03:42 AM
God dammit triple post

I also forgot to put wait statements in the loops, because without, it'll crash.

Just put

wait()

under the while yadda do and it'll work

~ I hope your day sucks. ~
Report Abuse
Maltese202 is not online. Maltese202
Joined: 27 Jun 2012
Total Posts: 3474
02 Apr 2015 03:49 AM
Alright.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » ROBLOX Talk
   
 
   
  • 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