BloxDaily
|
  |
| Joined: 08 Feb 2013 |
| Total Posts: 5319 |
|
|
| 30 Nov 2013 10:07 PM |
I need help to where there in this group but a certain rank to go through.
debounce = false
script.Parent.Touched:connect(function(hit) if (hit) then if (hit.Parent) then if (game.Players:GetPlayerFromCharacter(hit.Parent)) then if (game.Players:GetPlayerFromCharacter(hit.Parent):IsInGroup(991999)) then debounce = true script.Parent.Transparency = 0.5 script.Parent.CanCollide = false wait(2) script.Parent.Transparency = 0 script.Parent.CanCollide = true debounce = false end end end end end)
Ranks are 4 and above which max/highest is 13 to be able for it to make the door's transparency to 0.5 and cancollide = false |
|
|
| Report Abuse |
|
|
BloxDaily
|
  |
| Joined: 08 Feb 2013 |
| Total Posts: 5319 |
|
| |
|
|
| 30 Nov 2013 10:15 PM |
debounce = false
script.Parent.Touched:connect(function(hit) local Player = Game.Players:GetPlayerFromCharacter(hit.Parent) if not Player then return end if Player:GetRoleInGroup(991999) >= 4 then debounce = true script.Parent.Transparency = 0.5 script.Parent.CanCollide = false wait(2) script.Parent.Transparency = 0 script.Parent.CanCollide = true debounce = false end end) |
|
|
| Report Abuse |
|
|
BloxDaily
|
  |
| Joined: 08 Feb 2013 |
| Total Posts: 5319 |
|
|
| 30 Nov 2013 10:57 PM |
@cody
23:56:01.378 - Workspace.Door.Script:6: attempt to compare number with string 23:56:01.379 - Script 'Workspace.Door.Script', Line 6 23:56:01.380 - stack end |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
jakej78b
|
  |
| Joined: 09 Mar 2011 |
| Total Posts: 813 |
|
|
| 30 Nov 2013 11:19 PM |
debounce = false role = "Rank Name" -- Either role or rank, or both. rank = 255 -- 255 = owner only
script.Parent.Touched:connect(function(hit) if not debounce then player = game.Players:GetPlayerFromCharacter(hit.Parent) if player and hit.Parent then
if player:GetRoleInGroup(991999) == role or player:GetRankInGroup(991999) == rank then debounce = true script.Parent.Transparency = 0.5 script.Parent.CanCollide = false wait(2) script.Parent.Transparency = 0 script.Parent.CanCollide = true debounce = false end end end end)
|
|
|
| Report Abuse |
|
|