generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Group only wall (help me)

Previous Thread :: Next Thread 
spearman2 is not online. 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
Inefficiency is not online. Inefficiency
Joined: 31 Jul 2012
Total Posts: 78
03 Aug 2012 05:54 PM
I created a script for this, hold up, lemme find it.
Report Abuse
xXTheRobotXxAlt is not online. xXTheRobotXxAlt
Joined: 06 Jul 2012
Total Posts: 548
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
xXTheRobotXxAlt is not online. xXTheRobotXxAlt
Joined: 06 Jul 2012
Total Posts: 548
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
xXTheRobotXxAlt is not online. xXTheRobotXxAlt
Joined: 06 Jul 2012
Total Posts: 548
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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
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
Inefficiency is not online. Inefficiency
Joined: 31 Jul 2012
Total Posts: 78
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
xXTheRobotXxAlt is not online. xXTheRobotXxAlt
Joined: 06 Jul 2012
Total Posts: 548
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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
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
Inefficiency is not online. Inefficiency
Joined: 31 Jul 2012
Total Posts: 78
03 Aug 2012 06:06 PM
> xxtherobotxxalt

No connect line.
Report Abuse
xXTheRobotXxAlt is not online. xXTheRobotXxAlt
Joined: 06 Jul 2012
Total Posts: 548
03 Aug 2012 06:09 PM
@Inneficeincy

I was skeptic about that
Report Abuse
spearman2 is not online. 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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
03 Aug 2012 06:13 PM
mine is teh bestt

† KMXD † ~ Evil Duck Overlord, bent on world domination.
Report Abuse
spearman2 is not online. 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
xXTheRobotXxAlt is not online. xXTheRobotXxAlt
Joined: 06 Jul 2012
Total Posts: 548
03 Aug 2012 06:27 PM
spear, regular

Report Abuse
spearman2 is not online. 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 is not online. 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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
12 Aug 2012 01:44 PM
Post the script you're using.

† KMXD †
Report Abuse
spearman2 is not online. 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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
12 Aug 2012 02:01 PM
Why didn't you just use mine?

† KMXD †
Report Abuse
MrChickens is not online. MrChickens
Joined: 21 Feb 2009
Total Posts: 1076
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 is not online. 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 is not online. 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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
13 Aug 2012 12:06 PM
Why the heck won't you use mine... D: It has been a week...

† KMXD †
Report Abuse
spearman2 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image