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
 

Re: My text wont change

Previous Thread :: Next Thread 
ShadowLegionaire is not online. ShadowLegionaire
Joined: 16 Aug 2013
Total Posts: 311
25 Oct 2013 07:07 PM


[::Fellow Renegades::] http://web.roblox.com/My/Groups.aspx?gid=757745
Report Abuse
ShadowLegionaire is not online. ShadowLegionaire
Joined: 16 Aug 2013
Total Posts: 311
25 Oct 2013 07:07 PM
Forgot script
SG = Instance.new("ScreenGui")
SG.Parent = Game.Players.LocalPlayer.PlayerGui


TEAMASCORE = Instance.new("TextButton")
TEAMASCORE.Size = UDim2.new(0,100,0,20)
TEAMASCORE.Position = UDim2.new(0,80,0,130)
TEAMASCORE.BackgroundColor3 = Color3.new(0,0,0)
TEAMASCORE:Clone().Parent = SG


TEAMBSCORE = Instance.new("TextButton")
TEAMBSCORE.Size = UDim2.new(0,100,0,20)
TEAMBSCORE.Position = UDim2.new(0,80,0,100)
TEAMBSCORE.BackgroundColor3 = Color3.new(0,0,0)
TEAMBSCORE:Clone().Parent = SG


ascore = 400
bscore = 400

TEAMASCORE.Text = ascore
TEAMBSCORE.Text = bscore

-- Making Value show on text.


game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
for _,v in (game.Players:GetChildren()) do
if child:IsA('Humanoid') then
child.Died:connect(function()
if player.TeamColor == "Bright Red" then
ascore = ascore -1
TEAMASCORE.Text = ascore
elseif player.TeamColor == "Bright Blue" then
bscore = bscore -1
TEAMBSCORE.Text = bscore




end
end)
end
end
end)
end)



[::Fellow Renegades::] http://web.roblox.com/My/Groups.aspx?gid=757745
Report Abuse
ShadowLegionaire is not online. ShadowLegionaire
Joined: 16 Aug 2013
Total Posts: 311
25 Oct 2013 07:22 PM
Please, I need help, when I say F.Text = ascore for example, the text wont change.

[::Fellow Renegades::] http://web.roblox.com/My/Groups.aspx?gid=757745
Report Abuse
MarkMcBlox is not online. MarkMcBlox
Joined: 04 May 2013
Total Posts: 873
25 Oct 2013 07:59 PM
You can't change the text to a integer, it must be a string.

tostring(ascore)
Report Abuse
MarkMcBlox is not online. MarkMcBlox
Joined: 04 May 2013
Total Posts: 873
25 Oct 2013 08:00 PM
Final Script

SG = Instance.new("ScreenGui")
SG.Parent = Game.Players.LocalPlayer.PlayerGui


TEAMASCORE = Instance.new("TextButton")
TEAMASCORE.Size = UDim2.new(0,100,0,20)
TEAMASCORE.Position = UDim2.new(0,80,0,130)
TEAMASCORE.BackgroundColor3 = Color3.new(0,0,0)
TEAMASCORE:Clone().Parent = SG


TEAMBSCORE = Instance.new("TextButton")
TEAMBSCORE.Size = UDim2.new(0,100,0,20)
TEAMBSCORE.Position = UDim2.new(0,80,0,100)
TEAMBSCORE.BackgroundColor3 = Color3.new(0,0,0)
TEAMBSCORE:Clone().Parent = SG


ascore = 400
bscore = 400

TEAMASCORE.Text = ascore
TEAMBSCORE.Text = bscore

-- Making Value show on text.


game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
for _,v in (game.Players:GetChildren()) do
if child:IsA('Humanoid') then
child.Died:connect(function()
if player.TeamColor == "Bright Red" then
ascore = ascore -1
TEAMASCORE.Text = tostring(ascore)
elseif player.TeamColor == "Bright Blue" then
bscore = bscore -1
TEAMBSCORE.Text = tostring(bscore)




end
end)
end
end
end)
end)
Report Abuse
darkwisp is not online. darkwisp
Joined: 07 Apr 2010
Total Posts: 22653
25 Oct 2013 08:12 PM
Still wont work.

[::Fellow Renegades::] http://web.roblox.com/My/Groups.aspx?gid=757745
Report Abuse
MarkMcBlox is not online. MarkMcBlox
Joined: 04 May 2013
Total Posts: 873
25 Oct 2013 08:23 PM
TEAMASCORE.Text = tostring(ascore)
TEAMBSCORE.Text = tostring(bscore

-- Making Value show on text.


game:GetService('Players').PlayerAdded:connect(function(player)

player.CharacterAdded:connect(function(character)
if player.TeamColor == "Bright Red" then
ascore = ascore -1
TEAMASCORE.Text = tostring(ascore)
elseif player.TeamColor == "Bright Blue" then
bscore = bscore -1
TEAMBSCORE.Text = tostring(bscore)
end
end)

character.Humanoid.Died:connect(function()
if player.TeamColor == "Bright Red" then
ascore = ascore -1
TEAMASCORE.Text = tostring(ascore)
elseif player.TeamColor == "Bright Blue" then
bscore = bscore -1
TEAMBSCORE.Text = tostring(bscore)
end
end)
end)
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