|
| 04 Dec 2016 07:23 PM |
so i've made this room and when you click a certain button, it's supposed to appear. when you click it again, it should disappear. however, it appears, but never disappears
local b = workspace.buttons local r = workspace.room local iceb = b.iceCave local bunb = b.bunker local beab = b.beach local forb = b.forest local temb = b.temple local norb = b.normal local i = true local bb = true local be = true local f = true local t = true local n = true
iceb.ClickDetector.MouseClick:connect(function() if i then i = false for i,v in pairs(workspace.iced:GetChildren()) do v.Transparency = 0 v.CanCollide = true for i,v in pairs(r:GetChildren()) do if v.Name == "iWall" then v.Transparency = 0 v.Material = "Ice" elseif v.Name == "Carpet" then v.Material = "Ice" end end end end end) iceb.ClickDetector.MouseClick:connect(function() if not i then i = true for i,v in pairs(workspace.iced:GetChildren()) do v.Transparency = 1 v.CanCollide = false for i,v in pairs(r:GetChildren()) do if v.Name == "iWall" then v.Transparency = 1 elseif v.Name == "Carpet" then v.Material = "Fabric" end end end end end)
attempt to call girlfriend (a nil value) | nothin' like a good argument ¯\_(ツ)_/¯ |
|
|
| Report Abuse |
|
|
|
| 04 Dec 2016 07:34 PM |
bb
attempt to call girlfriend (a nil value) | nothin' like a good argument ¯\_(ツ)_/¯ |
|
|
| Report Abuse |
|
|
|
| 04 Dec 2016 08:59 PM |
| Try using a different technique. My suggestion is that every time a player clicks the part, a variable changes depending on its current value, and other parts of the script activate when the variable = 1 or 2 |
|
|
| Report Abuse |
|
|
|
| 05 Dec 2016 04:45 PM |
bump
attempt to call girlfriend (a nil value) | nothin' like a good argument ¯\_(ツ)_/¯ |
|
|
| Report Abuse |
|
|