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 » Scripters
Home Search
 

Re: This script is not working

Previous Thread :: Next Thread 
CraftioLo is not online. CraftioLo
Joined: 09 Sep 2014
Total Posts: 1937
20 Oct 2015 11:28 AM
So, i wanted to change for my door script that instead of letting pass the doors everyone who is in my group, it lets only pass people that are specific rank in the group. I just added rank lines to the code, but now its not working at all.

CurrentGroup = 2684229 -- Change this to GroupID of your group
Door = script.Parent -- Do not modify
IsActive = false -- Do not modify
KillOnContact = false -- If true, kills non group members, if false does not let them in.
WaitTime = 2 -- Amount of time door remains open
G1 = script.Parent.Parent.Green1
G2 = script.Parent.Parent.Green2
R1 = script.Parent.Parent.Red1
R2 = script.Parent.Parent.Red2


function Touched(Part)
if IsActive then return end
IsActive = true
if Part.Parent then
Player = game.Players:playerFromCharacter(Part.Parent)
if Player then
if Player:IsInGroup(CurrentGroup) then
if Player:GetRankInGroup(CurrentGroup) == 255
if Player:GetRankInGroup(CurrentGroup) == 254
if Player:GetRankInGroup(CurrentGroup) == 80
end
end
Open()
else
print("Atleast it exists?")
R1.BrickColor = BrickColor.new("Really red")
R2.BrickColor = BrickColor.new("Really red")
if KillOnContact then Part.Parent:breakJoints()
wait(WaitTime)
R1.BrickColor = BrickColor.new("Black")
R2.BrickColor = BrickColor.new("Black")
end
end
end
end
IsActive = false
end

function Open()

G1.BrickColor = BrickColor.new("Lime green")
G2.BrickColor = BrickColor.new("Lime green")
Door.Transparency = 1
Door.CanCollide = false
wait(WaitTime)
G1.BrickColor = BrickColor.new("Black")
G2.BrickColor = BrickColor.new("Black")
Door.CanCollide = true
Door.Transparency = 0

end

Door.Touched:connect(Touched)


Signature, because its needed!
Report Abuse
CraftioLo is not online. CraftioLo
Joined: 09 Sep 2014
Total Posts: 1937
20 Oct 2015 11:50 AM
bump,


Signature, because its needed!
Report Abuse
CraftioLo is not online. CraftioLo
Joined: 09 Sep 2014
Total Posts: 1937
20 Oct 2015 11:58 AM
Still no answers? Lol, where are all the ''pro'' scripters who are very ''helpfull''?


Signature, because its needed!
Report Abuse
RePlayableEvents is not online. RePlayableEvents
Joined: 28 May 2015
Total Posts: 871
20 Oct 2015 12:26 PM
Tell me the error from the ROBLOX Studio output.


Amateur scripter, NBC
Report Abuse
LightningToaster is not online. LightningToaster
Joined: 17 Sep 2012
Total Posts: 68
20 Oct 2015 12:28 PM
Is this a local script and what is its parent?
Report Abuse
CraftioLo is not online. CraftioLo
Joined: 09 Sep 2014
Total Posts: 1937
20 Oct 2015 01:52 PM
@lighting does it looks like a local script..... why are you searching for mistakes in lines that are not written wrong. I just need to figure out how to make it check if the user is one of the listed ranks and then do the door open command. Its parent is the door block. I just need someone to fix the Player: part.


Signature, because its needed!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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