|
| 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 |
|
|
| |
|
| |
|
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 |
|
|
|
| 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 |
|
|
| |
|
| |
|
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 |
|
|
|
| 01 Jan 2014 07:49 PM |
that makes sense but it doesn't work
output: attempt to call a nil value |
|
|
| Report Abuse |
|
|
| |
|
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 |
|
|