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
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Security guard script.

Previous Thread :: Next Thread 
wuppii is not online. wuppii
Joined: 20 Feb 2010
Total Posts: 1625
21 Oct 2011 10:33 AM
S = Workspace.Security
O = Workspace.Security.Ow
LA = Workspace.Security.Left Arm
LAA = Workspace.Security.Left Arm Arm

local player = game.Players:GetPlayers()

function onTouched(hit)
if Players.player:IsInGroup(53272) then
print 'You are in the group mate!!'
O.CanCollide = false
Workspace.Security.Name = "Welcome sir!"
elseif LA.Transparency = 0.7
print NO!!'
LA.CanCollide = false
LA.Transparency = 0.7
LAA.Transparency = 0
LAA.CanCollide = true
Workspace.S.Name = "You are not allowed to enter."
print 'Name Changed 1'
wait(2)
Workspace.S.Name = "Security"
print 'Name Changed 2'
LA.CanCollide = true
LA.Transparency = 0
LAA.Transparency = 0.7
LAA.CanCollide = false
end
end

script.Parent.Touched:connect(onTouched)
----------------------------------------------------------------------------------
I do not know what went wrong.
--No output.
-- I know it looks dumb.
[ I was just trieng something :3 ]
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
21 Oct 2011 10:35 AM
Nice lies, you will recieve an error output for this:


if Players.player:IsInGroup(53272) then <---

Report Abuse
wuppii is not online. wuppii
Joined: 20 Feb 2010
Total Posts: 1625
21 Oct 2011 10:36 AM
What do you mean "Nice lies"?
and, no it didn't give an error..
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
21 Oct 2011 10:36 AM
Obviously it does, either you're not in edit/build mode and/or you don't have output open.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
21 Oct 2011 10:38 AM
It also errors on this;
LA = Workspace.Security.Left Arm
LAA = Workspace.Security.Left Arm Arm
Report Abuse
wuppii is not online. wuppii
Joined: 20 Feb 2010
Total Posts: 1625
21 Oct 2011 10:39 AM
Quite weird because at first it was blank, but now it says:

Fri Oct 21 17:38:47 2011 - Workspace.Security.Script:4: '=' expected near 'LAA'
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
21 Oct 2011 10:39 AM
Will you quit lieing.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
21 Oct 2011 10:40 AM
LA = Workspace.Security["Left Arm"]
LAA = Workspace.Security["Left Arm Arm"]

lrn2scrpt
Report Abuse
wuppii is not online. wuppii
Joined: 20 Feb 2010
Total Posts: 1625
21 Oct 2011 10:41 AM
I aint lieng!
Report Abuse
wuppii is not online. wuppii
Joined: 20 Feb 2010
Total Posts: 1625
21 Oct 2011 10:41 AM
Thank you su8, you're helpful :3
Report Abuse
wuppii is not online. wuppii
Joined: 20 Feb 2010
Total Posts: 1625
21 Oct 2011 10:47 AM
So...what else?
Report Abuse
wuppii is not online. wuppii
Joined: 20 Feb 2010
Total Posts: 1625
21 Oct 2011 10:57 AM
erm...help?
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
21 Oct 2011 10:57 AM
Show us first the output now
Report Abuse
wuppii is not online. wuppii
Joined: 20 Feb 2010
Total Posts: 1625
21 Oct 2011 11:00 AM
Output:

Workspace.Security.Script:13: 'then' expected near '='
Report Abuse
deividaxas is not online. deividaxas
Joined: 20 Feb 2009
Total Posts: 1054
21 Oct 2011 11:05 AM
find line 13 where it is Transparency=0.5 write Transparency==0.5
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
21 Oct 2011 11:06 AM
Also add "then"
Report Abuse
wuppii is not online. wuppii
Joined: 20 Feb 2010
Total Posts: 1625
21 Oct 2011 11:08 AM
So like this:

elseif then LA.Transparency == 0.7
Report Abuse
eJorge is not online. eJorge
Joined: 09 Jun 2011
Total Posts: 5966
21 Oct 2011 11:10 AM
S = Workspace.Security
O = Workspace.Security.Ow
LA = Workspace.Security.Left Arm
LAA = Workspace.Security.Left Arm Arm

local player = game.Players:GetPlayers()

function onTouched(hit)
if Players.player:IsInGroup(53272) then
print 'You are in the group mate!!'
O.CanCollide = false
Workspace.Security.Name = "Welcome sir!"
elseif LA.Transparency == 0.7
print 'NO!!'
LA.CanCollide = false
LA.Transparency = 0.7
LAA.Transparency = 0
LAA.CanCollide = true
Workspace.S.Name = "You are not allowed to enter."
print 'Name Changed 1'
wait(2)
Workspace.S.Name = "Security"
print 'Name Changed 2'
LA.CanCollide = true
LA.Transparency = 0
LAA.Transparency = 0.7
LAA.CanCollide = false
end
end

script.Parent.Touched:connect(onTouched)

Now it should work.
Report Abuse
wuppii is not online. wuppii
Joined: 20 Feb 2010
Total Posts: 1625
21 Oct 2011 11:14 AM
@eJorge, it is saying:

Fri Oct 21 18:14:29 2011 - Workspace.Security.Script:4: '=' expected near 'LAA'
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
21 Oct 2011 11:19 AM
You don't want my help, then rather enjoy their help wich won't succeed.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
21 Oct 2011 11:26 AM
S = Workspace.Security
O = Workspace.Security.Ow
LA = Workspace.Security.Left Arm
LAA = Workspace.Security.Left Arm Arm



function onTouched(hit)
ch=hit.Parent
player = game.Players:GetPlayerFromCharacter(ch)
if player~= nil then
if player:IsInGroup(53272) then
print 'You are in the group mate!!'
O.CanCollide = false
Workspace.Security.Name = "Welcome sir!"
elseif LA.Transparency == 0.7 then
print 'NO!!'
LA.CanCollide = false
LA.Transparency = 0.7
LAA.Transparency = 0
LAA.CanCollide = true
Workspace.S.Name = "You are not allowed to enter."
print 'Name Changed 1'
wait(2)
Workspace.S.Name = "Security"
print 'Name Changed 2'
LA.CanCollide = true
LA.Transparency = 0
LAA.Transparency = 0.7
LAA.CanCollide = false
end
end
end

script.Parent.Touched:connect(onTouched)
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
21 Oct 2011 11:26 AM
@su: No.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
21 Oct 2011 11:28 AM
Say the error?
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
21 Oct 2011 11:30 AM
The first two I found:

LA = Workspace.Security.Left Arm
LAA = Workspace.Security.Left Arm Arm
Report Abuse
wuppii is not online. wuppii
Joined: 20 Feb 2010
Total Posts: 1625
21 Oct 2011 11:30 AM
Fri Oct 21 18:30:42 2011 - Workspace.Script2:4: '=' expected near 'LAA'

>_<
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