AndillasI
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 503 |
|
|
| 22 Dec 2011 02:18 PM |
I know it's faulty and I know most of it is legitimate. I think the problem is in the if statement. I don't know how to write connector lines at all.
door = script.Parent (should there be a variable identifying the Player?)
function touch if Player.new:IsInGroup "ID HERE" -- Put your group ID here door.Transparency = .8 door.CanCollide = false wait(3) -- how long you want the door to be open door.Transparency = 0 door.CanCollide = true end end [connector] |
|
|
| Report Abuse |
|
|
dirk29
|
  |
| Joined: 26 May 2010 |
| Total Posts: 1142 |
|
|
| 22 Dec 2011 02:24 PM |
door = script.Parent ID = <--Group ID
door.Touched:connect(function(Player) PL = Player:GetPlayerFromCharacter(Player) if PL:IsInGroup(ID) door.Transparency = .8 door.CanCollide = false wait(3) -- how long you want the door to be open door.Transparency = 0 door.CanCollide = true end end) |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 22 Dec 2011 02:25 PM |
Player does not exist.
function touch should be function touch()
[connector] should be a legitimate connection line. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2011 03:22 PM |
door = script.Parent ID = <--Group ID door.Touched:connect(function(Player) PL = p:GetPlayerFromCharacter(Player) if PL:IsInGroup(ID) door.Transparency = .8 door.CanCollide = false wait(3) -- how long you want the door to be open door.Transparency = 0 door.CanCollide = true end end)
The player is like the soul of your robloxian. The character is your body. |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 22 Dec 2011 03:28 PM |
| And yet everyone is ignoring the lack of 'then' after the condition. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2011 03:41 PM |
door = script.Parent groupid = 123456 waittime = 3
function touched(part) if part.Parent:findFirstChild("Humanoid") then player = script.Parent if player.IsInGroup(groupid) then door.Transparency = .8 door.CanCollide = false wait(waittime) door.Transparency = 0 door.CanCollide = true end end end script.Parent.Touched:connect(touched) |
|
|
| Report Abuse |
|
|