Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

what's wrong? i cant make this script work only for rank in group

Asked by 5 years ago

i wanted to make that rank or higher rank be able to use import script but it doesn't work, i have rank but still...

01local player = game.Players.LocalPlayer
02local RN = player:GetRankInGroup(808191)
03 
04 
05game.Players.LocalPlayer.Chatted:connect( function( Message )
06    if RN >= 2 then
07    if ToolSelected and Message:lower():match( '/import ' ) or Message:lower():match( ':import ' ) then
08        if Message:sub( 9, 12 ) == 'wjkg' then return; end
09        Container = game:GetService( 'ReplicatedStorage' ).Import:InvokeServer( Message:sub( 9, 12 ) )
10 
11        if Container and Container:IsA( 'Model' ) and #Container:GetChildren() > 0 then
12            Container.Parent = workspace
13            Core.Selection.Clear()
14            repeat wait() Core.Selection.Add( Container:GetChildren() ) until #Core.Selection.Items == #Container:GetChildren()
15        end
16    end
17    end
18end )

what do i do?

1 answer

Log in to vote
0
Answered by 5 years ago
0105  game.Players.LocalPlayer.Chatted:connect( function( Message )
0206      if RN >= 2 then
0307      if ToolSelected and Message:lower():match( '/import ' ) or Message:lower():match( ':import ' ) then
0408          if Message:sub( 9, 12 ) == 'wjkg' then return; end
0509          Container = game:GetService( 'ReplicatedStorage' ).Import:InvokeServer( Message:sub( 9, 12 ) )
0610  
0711          if Container and Container:IsA( 'Model' ) and #Container:GetChildren() > 0 then
0812              Container.Parent = workspace
0913              Core.Selection.Clear()
1014              repeat wait() Core.Selection.Add( Container:GetChildren() ) until #Core.Selection.Items == #Container:GetChildren()
1115          end
1216      end
1317      end
1418  end )

all this part wont work after "if RN >= 2 then", no errors, even if you have this rank

Ad

Answer this question