|
| 20 Aug 2016 08:52 PM |
Mk, so I put in a door script:
script.Parent.Touched:connect(function(hit) if (hit and hit.Parent and game.Players:FindFirstChild(hit.Parent.Name)) then if (game.Players[hit.Parent.Name]:IsInGroup(1149634) and game.Players[hit.Parent.Name]:GetRankInGroup(1149634) >= 10) then script.Parent.CanCollide = false script.Parent.Transparency = .9 wait(1) script.Parent.CanCollide = true script.Parent.Transparency = 0 else script.Parent.CanCollide = true end end end)
But I want it to be an invisible door. When I try to change the first Transparency to 0, it always resets back to .9. I tried to save the game with it on 0, but it never works. When I first enter the game, it appears invisible, until it is used it is visible again. Help me out!
Thanksss. |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Aug 2016 09:14 PM |
i think that you need to add a debounce
google it or search the wiki for it to learn more about what it is |
|
|
| Report Abuse |
|
|
| |
|
peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
|
| 20 Aug 2016 09:26 PM |
this should work
local db = false
script.Parent.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player and db == false and player:IsInGroup(1149634) and player:GetRankInGroup(1149634) >= 10 then db = true script.Parent.CanCollide = false script.Parent.Transparency = .9 wait(1) script.Parent.CanCollide = true script.Parent.Transparency = 0 db = false end end)
|
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Aug 2016 10:13 PM |
local db = false
script.Parent.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player and db == false and player:IsInGroup(1149634) and player:GetRankInGroup(1149634) >= 10 then db = true script.Parent.CanCollide = false script.Parent.Transparency = 0 wait(1) script.Parent.CanCollide = true script.Parent.Transparency = 0 db = false end end)
nothin' like a good argument ¯\_(ツ)_/¯ |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Aug 2016 09:10 AM |
is there anything else that might work? e.e
|
|
|
| Report Abuse |
|
|