Suffixed
|
  |
| Joined: 25 Apr 2014 |
| Total Posts: 481 |
|
|
| 27 Jan 2015 04:30 PM |
Hi, I'm currently in need of some help. I'm trying to create a script that runs if a player's rank in a group is something. Here's what I have so far: if player:GetRankInGroup(groupID) == 254 then game.Workspace.PLAYERNAME.Head.Title.F.T.TextColor3 = Color3.new(36, 157, 0) end
I've also tried: if player:GetRankInGroup(groupID) == "Founder" then game.Workspace.PLAYERNAME.Head.Title.F.T.TextColor3 = Color3.new(36, 157, 0) end
So far, everyone's name is green, regardless of rank. I want it to only be green for the specified rank. If somebody could help me, I'd be highly greatful. Thanks. |
|
|
| Report Abuse |
|
|
Hassan09
|
  |
| Joined: 29 Oct 2009 |
| Total Posts: 216 |
|
|
| 27 Jan 2015 04:32 PM |
is groupID a variable?? cause if that's all you have, and it's a variable, you need to make the actual variable.
groupID = putgroupIDhere if player:GetRankInGroup(groupID) == 254 then game.Workspace.PLAYERNAME.Head.Title.F.T.TextColor3 = Color3.new(36, 157, 0) end |
|
|
| Report Abuse |
|
|
Suffixed
|
  |
| Joined: 25 Apr 2014 |
| Total Posts: 481 |
|
|
| 27 Jan 2015 04:36 PM |
| Yes, groupID is a variable that has already been defined. |
|
|
| Report Abuse |
|
|
KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
|
| 27 Jan 2015 04:38 PM |
Try this in a LocalScript
local player = game.Players.LocalPlayer if player:GetRankInGroup(1337)==254 then player.Character.Head.Title.F.T.TextColor3 = Color3.new(36/255,157/255,0/255) end |
|
|
| Report Abuse |
|
|
Suffixed
|
  |
| Joined: 25 Apr 2014 |
| Total Posts: 481 |
|
|
| 27 Jan 2015 04:42 PM |
@KLGA After setting it up, it did not work. |
|
|
| Report Abuse |
|
|
Suffixed
|
  |
| Joined: 25 Apr 2014 |
| Total Posts: 481 |
|
|
| 27 Jan 2015 04:44 PM |
Here's the whole script: --[[
Player Rank Display v.1.0.1 Slayer219 December 15, 2012
]]--
-- VARS --
--[[local ranks = { ['s00per lidear'] = 255; --pattern ['rank'] = permission level (get both from group admin page!) ['ok this mod'] = 254; ['who u? ok.'] = 1; };]] --for old version
local groupID = 1189358; --change groupID to your group ID local before_name = false; --true if you want the player's rank displayed before their name, false if you want it displayed after. local ts = tostring
-- REMOVE NAME, FIND RANK --
game.Players.PlayerAdded:connect(function(player) repeat wait() until player.Character local char = player.Character getRole(player) player.Changed:connect(function() repeat wait() until player.Character wait() getRole(player) end) end)
-- CREATE CUSTOM TITLE --
function createTitle(p, s) local gui = script.Title local clone = gui:Clone() clone.Parent = p.Character.Head if before_name then clone.F.T.Text = s.." "..p.Name else clone.F.T.Text = p.Name..", "..s end end
function getRole(player) player.Character.Humanoid.NameOcclusion = "OccludeAll" if player.Character.Head:findFirstChild("Title") then return false elseif not player.Character.Head:findFirstChild("Title") and player:IsInGroup(groupID) then local rankString = player:GetRoleInGroup(groupID) --[[for i, v in pairs(ranks) do if rank_num == v then local rankString = i createTitle(player, rankString) else print("No rank specified for the permission level "..ts(rank_num)) createTitle(player, "") end end]] createTitle(player, rankString) elseif not player:IsInGroup(groupID) then print("Player is not in group "..ts(groupID)) createTitle(player, "Visitor") end if player:GetRankInGroup(groupID) == 254 then player.Title.F.T.TextColor3 = Color3.new(36, 157, 0) end end
-- DONE --
It's a free-modeled script I'm using for my group. Near the bottom is what I'm trying to accomplish. |
|
|
| Report Abuse |
|
|