Revelted
|
  |
| Joined: 02 Nov 2014 |
| Total Posts: 503 |
|
|
| 15 Dec 2015 08:25 PM |
function onTouched(hit) game.Workspace.a.Transparency = .1 wait (.1) game.Workspace.a.Transparency = .2 wait (.1) game.Workspace.a.Transparency = .3 wait (.1) game.Workspace.a.Transparency = .4 wait (.1) game.Workspace.a.CanCollide = true
end
script.Parent.Touched: connect(onTouched)
Lol did i just dungoof somewere or what, because this aint working for me
I have the script inside a brick named "Stand"
and when you touch it i want brick named "a" to do the following. |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2015 08:29 PM |
function OnTouched(Hit) game.Workspace.a.Transparency = .1 wait (.1) game.Workspace.a.Transparency = .2 wait (.1) game.Workspace.a.Transparency = .3 wait (.1) game.Workspace.a.Transparency = .4 wait (.1) game.Workspace.a.CanCollide = true end game.Workspace.a.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
Netakra
|
  |
| Joined: 02 Dec 2015 |
| Total Posts: 606 |
|
|
| 15 Dec 2015 08:29 PM |
script.Parent.Touched:connect(function(hit)
deb = true
if deb == true then deb = false for i = .1,.4,.1 do game.Workspace.a.Transparency = i wait(1) end end
game.Workspace.a.CanCollide = true deb = true
end) |
|
|
| Report Abuse |
|
|
Netakra
|
  |
| Joined: 02 Dec 2015 |
| Total Posts: 606 |
|
|
| 15 Dec 2015 08:30 PM |
Use mine ^^
It has a debounce so they can't touch it multiple times and make it glitch when it's trying to run the for loop. |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2015 08:35 PM |
Sorry, I failed...
Don't use mine. |
|
|
| Report Abuse |
|
|
Revelted
|
  |
| Joined: 02 Nov 2014 |
| Total Posts: 503 |
|
|
| 15 Dec 2015 08:36 PM |
niether worked :(
http://www.roblox.com/games/196596409/My-Testing-Grounds
I need it so you walk in front of that mirror thing that transparent stairs appear |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2015 08:37 PM |
| Is there a error message that occurs in the output of your game? |
|
|
| Report Abuse |
|
|
Netakra
|
  |
| Joined: 02 Dec 2015 |
| Total Posts: 606 |
|
|
| 15 Dec 2015 08:37 PM |
| Lol not fail, you just need to learn for loops and remember that a debounce is needed since roblox touched event is glitchy and registers around 5 touches every time you touch something lol |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2015 08:38 PM |
Yeah, I know I was just lazy to add no loops. |
|
|
| Report Abuse |
|
|
Netakra
|
  |
| Joined: 02 Dec 2015 |
| Total Posts: 606 |
|
|
| 15 Dec 2015 08:38 PM |
| I hope when you say that the "stairs didn't appear", you don't just have the script in a model? If you do, you need to do it for each stair with a for loop. |
|
|
| Report Abuse |
|
|
Revelted
|
  |
| Joined: 02 Nov 2014 |
| Total Posts: 503 |
|
|
| 15 Dec 2015 08:41 PM |
The scrip in inside the "Stand brick" but i dont have all the stairs grouped, Does it need to be grouped?
|
|
|
| Report Abuse |
|
|
|
| 15 Dec 2015 08:42 PM |
| Not necessarily, but i'm already confused as it is. xD |
|
|
| Report Abuse |
|
|
Revelted
|
  |
| Joined: 02 Nov 2014 |
| Total Posts: 503 |
|
|
| 15 Dec 2015 08:43 PM |
| me to, and i just realized i started from .1 when it needs to start at .9 Derp |
|
|
| Report Abuse |
|
|
Revelted
|
  |
| Joined: 02 Nov 2014 |
| Total Posts: 503 |
|
|
| 15 Dec 2015 08:43 PM |
| Like if you visit that place, ull see i have the building skill, not scripting :P |
|
|
| Report Abuse |
|
|
Netakra
|
  |
| Joined: 02 Dec 2015 |
| Total Posts: 606 |
|
|
| 15 Dec 2015 08:46 PM |
Here, I will do it for you lol.
-------------------
stairs = game.Workspace.STAIRSMODELNAME deb = true
script.Parent.Touched:connect(function(hit)
if deb == true then deb = false for x = .1,.4,.1 do for i,v in pairs(stairs:GetChildren()) do v.Transparency = x end wait(1) end for j,k in pairs(stairs:GetChildren()) do k.CanCollide = true end end
deb = true
end)
------------------- |
|
|
| Report Abuse |
|
|
Netakra
|
  |
| Joined: 02 Dec 2015 |
| Total Posts: 606 |
|
|
| 15 Dec 2015 08:47 PM |
| Put that script into the brick they hit for the stairs to appear |
|
|
| Report Abuse |
|
|
Netakra
|
  |
| Joined: 02 Dec 2015 |
| Total Posts: 606 |
|
|
| 15 Dec 2015 08:48 PM |
| Also, make sure to group the stairs and name it something and put that in the script, and make sure there are only Parts in the model. |
|
|
| Report Abuse |
|
|
Revelted
|
  |
| Joined: 02 Nov 2014 |
| Total Posts: 503 |
|
|
| 15 Dec 2015 08:52 PM |
Alright they apppear when i touch it, But i want each step to glow 1 at a time
all the steps are called "a" "b" "c" "d" and "e" a being the first and e being the last, there is also an image on brick e that needs to appear when it appears and the transparency needs to be 0.8
and last but not least, after each stair that appears , i want a certain sound to happen
:P too much? or is that easy? |
|
|
| Report Abuse |
|
|
Netakra
|
  |
| Joined: 02 Dec 2015 |
| Total Posts: 606 |
|
|
| 15 Dec 2015 08:55 PM |
Easy, but I've given you what I interpreted from your descriptions. You may want to try to learn how to do it yourself based off my code or the wiki :P
Coding is fun and easy, just learn the syntax. |
|
|
| Report Abuse |
|
|
Revelted
|
  |
| Joined: 02 Nov 2014 |
| Total Posts: 503 |
|
|
| 15 Dec 2015 08:56 PM |
| Ive already tried that DX i used to be able with the first thing i said, and if i could use that, id be fine but i cant DX |
|
|
| Report Abuse |
|
|
Revelted
|
  |
| Joined: 02 Nov 2014 |
| Total Posts: 503 |
|
|
| 15 Dec 2015 08:58 PM |
Have you ever played zelda: twilight princess?
|
|
|
| Report Abuse |
|
|
Revelted
|
  |
| Joined: 02 Nov 2014 |
| Total Posts: 503 |
|
|
| 15 Dec 2015 08:59 PM |
| Because im working on a model that includes that ; the mirror,ive already build the frame + the mirror, just need the steps |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2015 09:15 PM |
function onTouched() game.Workspace.a.Transparency = .1 wait (.1) game.Workspace.a.Transparency = .2 wait (.1) game.Workspace.a.Transparency = .3 wait (.1) game.Workspace.a.Transparency = .4 wait (.1) game.Workspace.a.CanCollide = true end script.Parent.Touched:connect(onTouched)
Did you know the chance of you being born was 1 in 400 trillion? |
|
|
| Report Abuse |
|
|