generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Why is this script not working?

Previous Thread :: Next Thread 
fhewgbre is not online. fhewgbre
Joined: 15 Jun 2016
Total Posts: 18
19 Jun 2017 11:07 AM
GroupId = 2962268 -- The ID of the group.
GroupN = "Sunny's Cafe" -- The name of the group.

function onPlayerRespawned(newPlayer)
if newPlayer:IsInGroup(GroupId) then
guigroup=Instance.new("BillboardGui")
guigroup.Parent=newPlayer.Character.Head
guigroup.Adornee=newPlayer.Character.Head
guigroup.Size=UDim2.new(4,0,2,0)
guigroup.StudsOffset=Vector3.new(0,2,0)
textgroup=Instance.new("TextLabel")
textgroup.Size=UDim2.new(1,0,1,0)
textgroup.BackgroundTransparency = 1
textgroup.TextColor3 = Color3.new(255/255, 255/255, 255/255)
textgroup.TextStrokeTransparency = 0
textgroup.TextTransparency = 0
textgroup.FontSize = "Size10"
Rank = newPlayer:GetRankInGroup(GroupId)
Player = newPlayer.Name
if Rank == 255 then
Rank = "Owner - "
end
if Rank == 254 then
Rank = "President - "
end
if Rank == 253 then
Rank = "Developer - "
end
if Rank == 252 then
Rank = "Management Team - "
end
if Rank == 251 then
Rank = "Supervisors - "
end
if Rank == 21 then
Rank = "Security - "
end
if Rank == 3 then
Rank = "Barista - "
end
if Rank == 2 then
Rank = "Awating Traning - "
end
if Rank == 1 then
Rank = "Cafe Guest - "
end
if Rank == 0 then
Rank = "Guest - "
end
textgroup.Text = ("["..GroupN.."] "..Rank..""..Player"")
textgroup.Parent=guigroup
end
end

function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)
if (property == "Character") then
onPlayerRespawned(newPlayer)
end
end)
end

game.Players.PlayerAdded:connect(onPlayerRespawned)
game.Players.PlayerAdded:connect(onPlayerEntered)
Report Abuse
fhewgbre is not online. fhewgbre
Joined: 15 Jun 2016
Total Posts: 18
19 Jun 2017 11:09 AM
Output:

18:08:23.368 - Stack Begin
18:08:23.370 - Script 'ServerScriptService.GroupRankID', Line 7
18:08:23.371 - Stack End
18:08:23.373 - ServerScriptService.Leaderboard:8: unfinished string near ''EXP'
18:08:23.384 - attempt to call a nil value
18:08:24.148 - Unable to find module for asset id
18:08:24.149 - Stack Begin
18:08:24.151 - Script 'Workspace.HandTo Menu | One Tech.HandTo Core', Line 37
18:08:24.151 - Stack End
18:08:24.152 - ServerScriptService.Group Rank:50: attempt to call global 'Player' (a string value)
18:08:24.153 - Stack Begin
18:08:24.153 - Script 'ServerScriptService.Group Rank', Line 50
18:08:24.154 - Stack End
18:08:24.202 - ServerScriptService.Group Rank:50: attempt to call global 'Player' (a string value)
18:08:24.203 - Stack Begin
18:08:24.204 - Script 'ServerScriptService.Group Rank', Line 50 - global onPlayerRespawned
18:08:24.204 - Script 'ServerScriptService.Group Rank', Line 58
18:08:24.205 - Stack End
Report Abuse
1Sensation1 is online. 1Sensation1
Joined: 24 Dec 2015
Total Posts: 339
19 Jun 2017 11:18 AM
did you define rank?
Report Abuse
fhewgbre is not online. fhewgbre
Joined: 15 Jun 2016
Total Posts: 18
19 Jun 2017 11:22 AM
Nvm but how i make the text bigger on the script? groupid = 2962268 game.Players.PlayerAdded:connect(onPlayerRespawned) function onPlayerRespawned(newPlayer) wait(1) if newPlayer:IsInGroup(groupid) then gui=Instance.new("BillboardGui") gui.Parent=newPlayer.Character.Head gui.Adornee=newPlayer.Character.Head gui.Size=UDim2.new(4,0,2,0) gui.StudsOffset=Vector3.new(0,3,0) texta=Instance.new("TextBox") texta.Size=UDim2.new(1,0,1,0) texta.BackgroundTransparency = 1 texta.Text = ("- " .. newPlayer:GetRoleInGroup(groupid) .. " -") texta.Parent=gui w = game.Lighting.WepsGroup:GetChildren() for i = #### ## ################### = newPlayer.Backpack end end end function onPlayerEntered(newPlayer) newPlayer.Changed:connect(function (property) if (property == "Character") then onPlayerRespawned(newPlayer) end end) end game.Players.PlayerAdded:connect(onPlayerEntered)
Report Abuse
Spxcific is not online. Spxcific
Joined: 25 Mar 2015
Total Posts: 9
19 Jun 2017 11:25 AM
Modify the:
textgroup.FontSize = "Size10" --you just change the number of the size.

If you want 12 as your font size, then:
textgroup.FontSize = "Size12"

There we go.
Report Abuse
Lucke0051 is not online. Lucke0051
Joined: 12 May 2016
Total Posts: 56
19 Jun 2017 11:31 AM
Dosent work.
Report Abuse
lyokofan10101 is not online. lyokofan10101
Joined: 23 Mar 2013
Total Posts: 52
19 Jun 2017 11:45 AM
you need to put local in front of when you declare the variable.

example:

local GroupId
local GroupN

local guigroup = Instance.new()
local textgroup = Instance.new()
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image