|
Hi I'm new and this sounds simple so plz help:
I need a script for a brick that when u step on another brick it dissapears so, like this equation: Step on Brick A=Brick B dissapear;Brick B dissapear =Brick c dissapear
so like theres a wall and u arent sposed to c whats behind it until u go into this house and u step on a brick and then the wall dissapears so when u go back out to see what happened u dont c a brick u see the wreckage. PLEASE HELP EITHER MESSAGE ME SCRIPT AND/OR POST SCRIPT ON FORUM ty for reading and possibly helping |
|
|
wait, so u want a brick where u step on it and a wall dissapears? |
|
|
exactly and when the wall dissapears another thing dissapears
oh and btw galisprayo i read the other thing u put on a forum where the guy named kaze said go to the wiki not forum it makes sence cuz if we all went to wiki there wud be no forum right? |
|
|
or just the one dissapears whatever u can do would be great |
|
|
i think u should just search for one in free models when u go to 'insert' at the top of the screen at ur place |
|
FlashJoeWTop 100 PosterJoin Date: 2007-12-24 Post Count: 4886 |
so you press a button, and it removes 2 bricks? that seems pretty easy |
|
|
exactly just i dont know the script so thats where u come in
Oh and about insert i dunno what i would search as ya know? |
|
|
try this
a = script.Parent -- make sure that the scripts parent is the button
b = game.Workspace.Door1 -- change door1 to the name of wall u want to dissapear
c = game.Workspace.Door2 -- change door2 to the second wall u want to dissapear
function onTouched(hit)
local personit = hit.Parent:findFirstChild("Humanoid")
if (personit == nil) then
b.Transperency = 1
b.CanCollide = false
wait(2) -- change 2 to the amount of seconds u want to wait for door2 to open
c.Transperency = 1
c.CanCollide = false
end
end
a.Touched:connect(onTouched)
Hope it works XD |
|
|
k ill try it and one more thing (dont yell at me)
errr how do i put a script on a brick? |
|
KazeJoin Date: 2007-05-08 Post Count: 9448 |
Cut the script and paste it into the brick. Or click and drag it. Whatever suits you. |
|
FlashJoeWTop 100 PosterJoin Date: 2007-12-24 Post Count: 4886 |
i can help here
go to insert(on the toolbar at the top)--> object--> Script
drag the script from the explorer into your button
voila! you have the script inside your button, this also makes the brick the parent of the script |
|
|
so how would i make one brick the brick B in the equation? as well as A |
|
FlashJoeWTop 100 PosterJoin Date: 2007-12-24 Post Count: 4886 |
Darn! my moment to shine was ripped from me by kaze!
(i really know how to exxagerate something)
but yeah, both of these are right..mine goes into more detail
*sticks tongue out at Kaze* ;) |
|
|
lol but uhh how can i make one brick a and one brick b? |
|
FlashJoeWTop 100 PosterJoin Date: 2007-12-24 Post Count: 4886 |
well the letter B is a variable, the b = game.Workspace.door2
makes it so that b symbolises that certain object
just name the bricks you want this script to affect: Door1 and Door2, make sure you have the letter case the same in the name in the script and the name of the brick |
|
|
gtg 10:00 where i am so ill read back tomorrow |
|
|
back for a sec what would I label the thing i want to dissapear like whats the script for that? from this-
a = script.Parent -- make sure that the scripts parent is the button
b = game.Workspace.Door1 -- change door1 to the name of wall u want to dissapear
c = game.Workspace.Door2 -- change door2 to the second wall u want to dissapear
function onTouched(hit)
local personit = hit.Parent:findFirstChild("Humanoid")
if (personit == nil) then
b.Transperency = 1
b.CanCollide = false
wait(2) -- change 2 to the amount of seconds u want to wait for door2 to open
c.Transperency = 1
c.CanCollide = false
end
end
a.Touched:connect(onTouched) |
|