Hi there, im having issues with a script that changes a decal with the players group. So if your for example number "6" in the group, it will change the decal to a specific texture. ( I have already removed the 1's etc)
groupId = 4068954 player = game.Players.LocalPlayer if player:GetRankInGroup(groupId) == 255 then --CC script.Parent.Decal.Texture = "http://www.roblox.com/asset/?id=1532554634" elseif player:GetRankInGroup(groupId) == 12 then --DCC script.Parent.Decal.Texture = "http://www.roblox.com/asset/?id=1532554395" elseif player:GetRankInGroup(groupId) == 11 then --ACC script.Parent.Decal.Texture = "http://www.roblox.com/asset/?id=1532554281" elseif player:GetRankInGroup(groupId) == 10 then --CS script.Parent.Decal.Texture = "http://www.roblox.com/asset/?id=1532553963" elseif player:GetRankInGroup(groupId) == 9 then --SU script.Parent.Decal.Texture = "http://www.roblox.com/asset/?id=1532553851" elseif player:GetRankInGroup(groupId) == 8 then --CINS script.Parent.Decal.Texture = "http://www.roblox.com/asset/?id=1532553648" elseif player:GetRankInGroup(groupId) == 7 then --INS script.Parent.Decal.Texture = "http://www.roblox.com/asset/?id=1532553514" elseif player:GetRankInGroup(groupId) == 6 then --SGT script.Parent.Decal.Texture = "http://www.roblox.com/asset/?id=1532553362" end
Much appreciation for any help given. -ChiefNight
I think I understand your problem: You're supposed to use rbxassetid when using IDs for audio instances, meshes and/or decals. Also, "GetRankInGroup" is not a valid method of the Player, and you'll have to use GroupService. The modified script:
groupId = 4068954 groupinfo = game:GetService("GroupService") groupinfo2 = groupinfo:GetGroupInfoAsync(groupId) -- Rest of the code here