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: Would this script work?

Previous Thread :: Next Thread 
Legostarwars98745 is not online. Legostarwars98745
Joined: 02 Jan 2008
Total Posts: 68659
01 Jan 2014 07:18 PM
I tried to write a script that would execute the same function for multiple frames.

-- START DEFINITIONS
local WS = script.Parent.WelcomeScreen
local WSRaid = WS.RaidRules
local WSBase = WS.BaseInfo
local WSTitle = WS.TitleBar
local WSRec = WS.Recruitment
local TextScreen = WS.TextScreen
local TextTemplate = WS.TextScreen
local AcceptButton = WS.AcceptButton
local BaseName = "BASENAME"
-- END DEFINITIONS

WSTitle.FortName.Text = "CENTRAL ALLIANCE: "..BaseName

function TweenSize()
x.Position = UDim2.new(x.Position.X.Scale,x.Position.X.Offset,x.Position.Y.Scale,x.Position.Y.Offset-8)
x.Size = UDim2.new(x.Size.X.Scale,x.Size.X.Offset,x.Size.Y.Scale,x.Size.Y.Offset+15)
end

function LeaveSize()
x.Position = UDim2.new(x.Position.X.Scale,x.Position.X.Offset,x.Position.Y.Scale,x.Position.Y.Offset+8)
x.Size = UDim2.new(x.Size.X.Scale,x.Size.X.Offset,x.Size.Y.Scale,x.Size.Y.Offset-15)
end

WSRaid.MouseEnter:connect(TweenSize) x=WSRaid
WSRaid.MouseLeave:connect(LeaveSize) x=WSRaid
WSBase.MouseEnter:connect(TweenSize) x=WSBase
WSBase.MouseLeave:connect(LeaveSize) x=WSBase
WSRec.MouseEnter:connect(TweenSize) x=WSRec
WSRec.MouseLeave:connect(LeaveSize) x=WSRec
Report Abuse
Legostarwars98745 is not online. Legostarwars98745
Joined: 02 Jan 2008
Total Posts: 68659
01 Jan 2014 07:24 PM
plz
Report Abuse
DrRandomous is not online. DrRandomous
Joined: 25 Mar 2011
Total Posts: 1702
01 Jan 2014 07:25 PM
Test it.
Report Abuse
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
01 Jan 2014 07:26 PM
Forgot to define x.

~Hope I helped, if you need a script, PM me first then buy this when I tell you to: http://www.roblox.com/My-Script-Shirt-item?id=118961994~~CAT ★★★★ General Shawnyg~
Report Abuse
Legostarwars98745 is not online. Legostarwars98745
Joined: 02 Jan 2008
Total Posts: 68659
01 Jan 2014 07:26 PM
i did. it partially works but it only does it for one frame regardless of which frame you mouse over
Report Abuse
Legostarwars98745 is not online. Legostarwars98745
Joined: 02 Jan 2008
Total Posts: 68659
01 Jan 2014 07:30 PM
^
Report Abuse
Legostarwars98745 is not online. Legostarwars98745
Joined: 02 Jan 2008
Total Posts: 68659
01 Jan 2014 07:44 PM
.
Report Abuse
lolb3 is not online. lolb3
Joined: 16 Jan 2010
Total Posts: 2268
01 Jan 2014 07:46 PM
-- START DEFINITIONS
local WS = script.Parent.WelcomeScreen
local WSRaid = WS.RaidRules
local WSBase = WS.BaseInfo
local WSTitle = WS.TitleBar
local WSRec = WS.Recruitment
local TextScreen = WS.TextScreen
local TextTemplate = WS.TextScreen
local AcceptButton = WS.AcceptButton
local BaseName = "BASENAME"
-- END DEFINITIONS

WSTitle.FortName.Text = "CENTRAL ALLIANCE: "..BaseName

function TweenSize(x)
x.Position = UDim2.new(x.Position.X.Scale,x.Position.X.Offset,x.Position.Y.Scale,x.Position.Y.Offset-8)
x.Size = UDim2.new(x.Size.X.Scale,x.Size.X.Offset,x.Size.Y.Scale,x.Size.Y.Offset+15)
end

function LeaveSize(x)
x.Position = UDim2.new(x.Position.X.Scale,x.Position.X.Offset,x.Position.Y.Scale,x.Position.Y.Offset+8)
x.Size = UDim2.new(x.Size.X.Scale,x.Size.X.Offset,x.Size.Y.Scale,x.Size.Y.Offset-15)
end

WSRaid.MouseEnter:connect(TweenSize(WSRaid))
WSRaid.MouseLeave:connect(LeaveSize(WSRaid))
WSBase.MouseEnter:connect(TweenSize(WSBase))
WSBase.MouseLeave:connect(LeaveSize(WSBase))
WSRec.MouseEnter:connect(TweenSize(WSRec))
WSRec.MouseLeave:connect(LeaveSize(WSRec))
Report Abuse
Legostarwars98745 is not online. Legostarwars98745
Joined: 02 Jan 2008
Total Posts: 68659
01 Jan 2014 07:49 PM
that makes sense but it doesn't work

output: attempt to call a nil value
Report Abuse
Legostarwars98745 is not online. Legostarwars98745
Joined: 02 Jan 2008
Total Posts: 68659
02 Jan 2014 02:35 PM
wat
Report Abuse
gunter5 is not online. gunter5
Joined: 15 Mar 2011
Total Posts: 737
02 Jan 2014 03:05 PM
ok sooo your calling upon a nil value which means your calling something that doesnt exactly exist so find the nil value your calling
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