|
| 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 |
|
|
| |
|
|
| 22 May 2013 03:54 PM |
| it tells me invalid value for enum font. what do i do now? |
|
|
| Report Abuse |
|
|
|
| 22 May 2013 03:57 PM |
| label.FontSize=Enum.FontSize.Size18 |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 22 May 2013 04:09 PM |
| okay thanks i never thought of that |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 22 May 2013 10:05 PM |
Instead of if (hit.Parent.Humanoid ~= nil) then try if (hit.Parent:findFirstChild("Humanoid")) then |
|
|
| Report Abuse |
|
|