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
|
  |
| Joined: 09 Sep 2014 |
| Total Posts: 1937 |
|
|
| 20 Oct 2015 11:50 AM |
bump,
Signature, because its needed! |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 20 Oct 2015 12:26 PM |
Tell me the error from the ROBLOX Studio output.
Amateur scripter, NBC |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2015 12:28 PM |
| Is this a local script and what is its parent? |
|
|
| Report Abuse |
|
|
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 |
|
|