spearman2
|
  |
| Joined: 28 May 2010 |
| Total Posts: 2938 |
|
|
| 03 Aug 2012 05:54 PM |
GroupID = 611536 ifgame.Players: FindFirstChild(player) : IsInGroup(611536) then function ontouched(part) Transparency = 0.5 Cancollide = false wait(0.9) Transparency = 1 Cancollide = 0 end end)
Ok what's wrong with that? Also is there a way so if the person is not in the group when they touch the wall they'll die. |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2012 05:54 PM |
| I created a script for this, hold up, lemme find it. |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2012 05:58 PM |
GroupID = 611536 ifgame.Players: FindFirstChild(player) : IsInGroup(611536) then function onTouched(part) Transparency = 0.5 Cancollide = false wait(0.9) Transparency = 1 Cancollide = 0 else local h = part.Workspace:findFirstChild("Humanoid") if h~=nil then h.Health = 0 end end)
Try this. |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2012 06:00 PM |
GroupID = 611536 if game.Players:FindFirstChild(player):IsInGroup(611536) then function onTouched(part) Transparency = 0.5 Cancollide = false wait(0.9) Transparency = 1 Cancollide = 0 else function onTouched(part) local h = part.Workspace:findFirstChild("Humanoid") if h~=nil then h.Health = 0 end end end end
Try this |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2012 06:03 PM |
GroupID = 611536 if game.Players:FindFirstChild(player):IsInGroup(611536) then function onTouched(part) Transparency = 0.5 CanCollide = false wait(0.9) Transparency = 1 CanCollide = true else function onTouched(part) local h = part.Workspace:findFirstChild("Humanoid") if h~=nil then h.Health = 0 end end end end
Third edit, man you had alot of bugs in that script. |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2012 06:04 PM |
local GroupID = 611536 local Door = script.Parent Door.Touched:connect(function(hit) pcall(function() local Player = Game.Players:GetPlayerFromCharacter(hit.Parent) if Player:IsInGroup(GroupID) then Door.Transparency = 0.5 Door.Cancollide = false wait(0.9) Door.Transparency = 1 Door.CanCollide = true else Player.Character:BreakJoints() end end) end)
† KMXD † ~ Evil Duck Overlord, bent on world domination. |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2012 06:04 PM |
GroupID = "" NameList = { }
game.Players.PlayerAdded:connect(function(player) local name = player.Name
if player:IsInGroup(GroupID) then table.insert(NameList, name) end end)
script.Parent.Touched:connect(function(hit) if hit.Parent then for i = 1, #NameList do if hit.Parent.Name == NameList[i] then script.Parent.Transparency = 0.5 script.Parent.CanCollide = false wait(5) script.Parent.Transparency = 0 script.Parent.CanCollide = true else hit.Parent:BreakJoints() end end end end) |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2012 06:05 PM |
Forget that, use this : local Door = script.Parent
function onTouched(hit) print("Door Hit") local human = hit.Parent:findFirstChild("Humanoid") if (human ~= nil ) then print("Human touched door") if game.Players[human.Parent.Name]:IsInGroup(Enter group ID here) == true then print("Human passed test") Door.Transparency = 0.7 Door.CanCollide = false wait(2) Door.CanCollide = true Door.Transparency = 0 else human.Health= 0 <-- this line kills anyone whos not allowed end end end |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2012 06:06 PM |
local GroupID = 611536 local Door = script.Parent Door.Touched:connect(function(hit) ypcall(function() local Player = Game.Players:GetPlayerFromCharacter(hit.Parent) if Player:IsInGroup(GroupID) then Door.Transparency = 0.5 Door.Cancollide = false wait(0.9) Door.Transparency = 1 Door.CanCollide = true else Player.Character:BreakJoints() end end) end)
† KMXD † ~ Evil Duck Overlord, bent on world domination. |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2012 06:06 PM |
> xxtherobotxxalt
No connect line. |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2012 06:09 PM |
@Inneficeincy
I was skeptic about that |
|
|
| Report Abuse |
|
|
spearman2
|
  |
| Joined: 28 May 2010 |
| Total Posts: 2938 |
|
|
| 03 Aug 2012 06:13 PM |
| Ok there is ALOT of scripts on this wall. Which one is the right one? |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2012 06:13 PM |
mine is teh bestt
† KMXD † ~ Evil Duck Overlord, bent on world domination. |
|
|
| Report Abuse |
|
|
spearman2
|
  |
| Joined: 28 May 2010 |
| Total Posts: 2938 |
|
|
| 03 Aug 2012 06:21 PM |
| The word "local" is in there, does that mean I put it in a localscript or just put it in a regular script? |
|
|
| Report Abuse |
|
|
| |
|
spearman2
|
  |
| Joined: 28 May 2010 |
| Total Posts: 2938 |
|
|
| 03 Aug 2012 06:38 PM |
| Ok. For a second there I got confused |
|
|
| Report Abuse |
|
|
spearman2
|
  |
| Joined: 28 May 2010 |
| Total Posts: 2938 |
|
|
| 12 Aug 2012 01:42 PM |
| Now it says this in the outpost: Workspace.Group Door.Group Door.Script:11: 'end' expected (to close 'function' at line 5) near 'else' |
|
|
| Report Abuse |
|
|
|
| 12 Aug 2012 01:44 PM |
Post the script you're using.
† KMXD † |
|
|
| Report Abuse |
|
|
spearman2
|
  |
| Joined: 28 May 2010 |
| Total Posts: 2938 |
|
|
| 12 Aug 2012 01:55 PM |
GroupID = 611536 if game.Players:FindFirstChild(player):IsInGroup(611536) then function onTouched(part) Transparency = 0.5 CanCollide = false wait(0.9) Transparency = 1 CanCollide = true else function onTouched(part) local h = part.Workspace:findFirstChild("Humanoid") if h~=nil then h.Health = 0 end end end end
|
|
|
| Report Abuse |
|
|
|
| 12 Aug 2012 02:01 PM |
Why didn't you just use mine?
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 12 Aug 2012 02:04 PM |
I've been through all of them, just use this.
GroupID = "" NameList = { }
game.Players.PlayerAdded:connect(function(player) local name = player.Name
if player:IsInGroup(GroupID) then table.insert(NameList, name) end end)
script.Parent.Touched:connect(function(hit) if hit.Parent then for i = 1, #NameList do if hit.Parent.Name == NameList[i] then script.Parent.Transparency = 0.5 script.Parent.CanCollide = false wait(5) script.Parent.Transparency = 0 script.Parent.CanCollide = true else hit.Parent:BreakJoints() end end end end) |
|
|
| Report Abuse |
|
|
spearman2
|
  |
| Joined: 28 May 2010 |
| Total Posts: 2938 |
|
|
| 13 Aug 2012 12:01 PM |
| MrChickens it says this for yours: Workspace.Part.Script:9: unexpected symbol near ')' |
|
|
| Report Abuse |
|
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 13 Aug 2012 12:05 PM |
local db = false; local door = script.Parent; door.Touched:connect(function (p) if (db) then return; end if (not p.Parent:findFirstChild("Humanoid")) then return; end local plr = game.Players[p.Parent.Name]; if (not plr) then return; end db = true; if (plr:IsInGroup(611536)) then door.Transparency = 0.5; door.CanCollide = false; wait(5); door.Transparency = 0; door.CanCollide = true; else p.Parent.Humanoid.Health = 0; wait(1); end db = false; end); |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2012 12:06 PM |
Why the heck won't you use mine... D: It has been a week...
† KMXD † |
|
|
| Report Abuse |
|
|
spearman2
|
  |
| Joined: 28 May 2010 |
| Total Posts: 2938 |
|
|
| 13 Aug 2012 12:09 PM |
@Dr it says this for yours: Touched is not a valid member of Script & "Workspace.Part.Script", Line 3
|
|
|
| Report Abuse |
|
|