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 » Scripting Helpers
Home Search
 

How do I Change the FontSize of a TextLabel?

Previous Thread :: Next Thread 
tastefulbobo is not online. tastefulbobo
Joined: 14 May 2010
Total Posts: 166
22 May 2013 03:49 PM
im having trouble getting the fontsize of a text label to change. i've tried nearly EVERYTHING in scripts. i dont want to use properties because im inserting the textlabel using a script.

please help.
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
22 May 2013 03:51 PM
label.FontSize="Size18"
Report Abuse
tastefulbobo is not online. tastefulbobo
Joined: 14 May 2010
Total Posts: 166
22 May 2013 03:54 PM
it tells me invalid value for enum font. what do i do now?
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
22 May 2013 03:57 PM
label.FontSize=Enum.FontSize.Size18
Report Abuse
tastefulbobo is not online. tastefulbobo
Joined: 14 May 2010
Total Posts: 166
22 May 2013 04:04 PM
Thanks! but now i have a new problem it keeps telling me Humanoid is not a valid member of workspace...
i dont think i've said Humanoid was in Workspace though.
here is my script:

function Damage(hit)
Handle = script.Parent
human = hit.Parent.Humanoid
if (human ~= nil) and script.Parent.Parent.Dmg.Value == true and hit.Parent ~= script.Parent.Parent.Parent then
player = game.Players:GetPlayerFromCharacter(script.Parent.Parent.Parent)
x = player.DMGAVG.Value/2
human.Health = human.Health - x
p = Instance.new("Part")
p.Transparency = 1
p.CanCollide = false
p.Size = Vector3.new(0.1, 0.1, 0.1)
p.Parent = hit.Parent
b = Instance.new("BillboardGui")
b.Active = true
b.Enabled = true
b.AlwaysOnTop = false
b.Size = UDim2.new(0, 20, 0, 20)
b.Parent = p
t = Instance.new("TextLabel")
t.Visible = true
t.Text = x
t.FontSize=Enum.FontSize.Size18
t.Font = Enum.Font.ArialBold
t.TextStrokeColor3 = Color3.new(255, 170, 127)
t.TextColor3 = Color3.new(255, 170, 0)
t.BackgroundTransparency = 1
t.Parent = b
s = Instance.new("Sound")
s.SoundId = "http://www.roblox.com/asset/?id=14863866"
s.Parent = p
game.Debris:AddItem(p, 15)
p.Position = hit.Parent.Head.Position
wait(0.1)
s:Play()
end
end

script.Parent.Touched:connect(Damage)
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
22 May 2013 04:08 PM
human = hit.Parent.Humanoid

What ever object is hitting this Brick, is a child of workspace, check for the player first or check if a humanoid exists
Report Abuse
tastefulbobo is not online. tastefulbobo
Joined: 14 May 2010
Total Posts: 166
22 May 2013 04:09 PM
okay thanks i never thought of that
Report Abuse
tastefulbobo is not online. tastefulbobo
Joined: 14 May 2010
Total Posts: 166
22 May 2013 04:19 PM
its still telling me that after i made this change:

function Damage(hit)
Handle = script.Parent
if (hit.Parent.Humanoid ~= nil) then
human = hit.Parent.Humanoid
if script.Parent.Parent.Dmg.Value == true and hit.Parent ~= script.Parent.Parent.Parent then
player = game.Players:GetPlayerFromCharacter(script.Parent.Parent.Parent)
x = player.DMGAVG.Value/2
human.Health = human.Health - x
p = Instance.new("Part")
p.Transparency = 1
p.CanCollide = false
p.Size = Vector3.new(0.1, 0.1, 0.1)
p.Parent = hit.Parent
b = Instance.new("BillboardGui")
b.Active = true
b.Enabled = true
b.AlwaysOnTop = false
b.Size = UDim2.new(0, 20, 0, 20)
b.Parent = p
t = Instance.new("TextLabel")
t.Visible = true
t.Text = x
t.FontSize=Enum.FontSize.Size18
t.Font = Enum.Font.ArialBold
t.TextStrokeColor3 = Color3.new(255, 170, 127)
t.TextColor3 = Color3.new(255, 170, 0)
t.BackgroundTransparency = 1
t.Parent = b
s = Instance.new("Sound")
s.SoundId = "http://www.roblox.com/asset/?id=14863866"
s.Parent = p
game.Debris:AddItem(p, 15)
p.Position = hit.Parent.Head.Position
wait(0.1)
s:Play()
end
end
end

script.Parent.Touched:connect(Damage)
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
22 May 2013 10:05 PM
Instead of
if (hit.Parent.Humanoid ~= nil) then
try
if (hit.Parent:findFirstChild("Humanoid")) then
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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