|
| 02 Apr 2015 03:11 AM |
| only make a play audio script. LEGIT. |
|
|
| Report Abuse |
|
|
|
| 02 Apr 2015 03:12 AM |
| I can change a part's transparency and color on touch/click. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 02 Apr 2015 03:32 AM |
| So if I change Mouse1Button to onClicked will it work? |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 02 Apr 2015 03:34 AM |
| Oh, wow. I am learning new things on the wrong subforum. Tracking... |
|
|
| Report Abuse |
|
|
|
| 02 Apr 2015 03:37 AM |
| what I mean is, where is the :connect function in it? |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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 |
|
|
| |
|