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: Help on simple script.

Previous Thread :: Next Thread 
playmobil1898 is not online. playmobil1898
Joined: 02 Jun 2009
Total Posts: 131
08 Apr 2013 05:55 PM
It says that BackgroundTransparency is a number value and I know it is but I thought the other was too. I think I'm just over looking it but can you please help?

bla = script.Parent.texxt
alb = game.StarterGui.Message.texxt

function update()
if script.Parent.Parent.Name ~= "StarterGui" then
alb.BackgroundTransparency = bla.BackgroundTransparency
alb.TextColor3 = bla.TextColor3
alb.Text = bla.Text
alb.TextTransparency = bla.TextTransparency
end
end

script.Parent.texxt.BackgroundTransparency.Changed:connect(update)
script.Parent.texxt.TextColor3.Changed:connect(update)
script.Parent.texxt.Text.Changed:connect(update)
script.Parent.texxt.TextTransparency.Changed:connect(update)
Report Abuse
NinjaShadow1 is not online. NinjaShadow1
Joined: 03 Mar 2009
Total Posts: 2689
08 Apr 2013 06:04 PM
replace your events with this

script.Parent.texxt.Changed:connect(update)


You cant put changed on a property of an item but it passes the property as an argument.
Report Abuse
NinjaShadow1 is not online. NinjaShadow1
Joined: 03 Mar 2009
Total Posts: 2689
08 Apr 2013 06:05 PM


so like

function changed(prop)
print(property)
end

item.Changed:connect(changed)

If I changed the Text property of 'item' it would print "Text"
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
08 Apr 2013 06:06 PM
You can't use .Changed on properties.

Game.Workspace.Part.Changed:connect(function(Property)
if Property == "Size" then
print(Part.Size)
end
end)
Report Abuse
playmobil1898 is not online. playmobil1898
Joined: 02 Jun 2009
Total Posts: 131
08 Apr 2013 06:06 PM
Last time I did that and it said changed is not a valid member of Screen Gui.
Report Abuse
NinjaShadow1 is not online. NinjaShadow1
Joined: 03 Mar 2009
Total Posts: 2689
08 Apr 2013 06:08 PM
It works. Trust me

http://wiki.roblox.com/index.php/Changed_(Event)/property


ALso to the other dude. You do know that anonymous functions are WAYY less efficient than normal connections?
Report Abuse
playmobil1898 is not online. playmobil1898
Joined: 02 Jun 2009
Total Posts: 131
08 Apr 2013 06:08 PM
Wait, game.workspace.part??? How can I use that for a gui?
Report Abuse
NinjaShadow1 is not online. NinjaShadow1
Joined: 03 Mar 2009
Total Posts: 2689
08 Apr 2013 06:09 PM
He made an example.

Use mine, its fine
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
08 Apr 2013 06:12 PM
Anonymous functions are less efficient if you use the function quite frequently.
Report Abuse
playmobil1898 is not online. playmobil1898
Joined: 02 Jun 2009
Total Posts: 131
08 Apr 2013 06:13 PM
Oh ok I see how I can say this... Thanks.
Report Abuse
NinjaShadow1 is not online. NinjaShadow1
Joined: 03 Mar 2009
Total Posts: 2689
08 Apr 2013 06:14 PM
No.
They actually run slower.
Test it.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
08 Apr 2013 07:32 PM
Okay, they do run slower. But honestly, the difference is too little for me to care.
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
08 Apr 2013 07:39 PM
Its funny how since the 'opponent' of Cody was right, he must say 'But honestly, the difference is too little for me to care.'. Its funn becuase he used 'But honestly,' and 'too little for me to care.'.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
08 Apr 2013 08:11 PM
Yes, hilarious.
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
08 Apr 2013 08:12 PM
Sarcasm gets you no where in life.

Ignorant.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
08 Apr 2013 08:21 PM
Without it I'd be bored.
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
08 Apr 2013 08:36 PM
Without it, I'd think you'd be Delightful to talk to.
Report Abuse
BrandonBass30 is not online. BrandonBass30
Joined: 09 Nov 2012
Total Posts: 1821
08 Apr 2013 08:40 PM
Cody and Fogg! You need to work on your banter...
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
08 Apr 2013 08:41 PM
@Brandon, I'd rather not. I dont think I have the time.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
08 Apr 2013 09:02 PM
Perhaps I could not be so sarcastic. I try to keep fellow scripters as friends.
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
08 Apr 2013 09:56 PM
@Cody, Please have that thought for awhile. If possible (Which I hope is true), we will be friends, can be friends, are friends. :)
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