local Item = Detects.Helmet
local Host = CharInterfaces:WaitForChild(Item.Name).UI
local MainFrame = Host:WaitForChild("MainSelection") ---THE NAME OF THE FRAME
local IconName = MainFrame:WaitForChild("Helmet Colour") ---THE NAME OF THE (CUSTOMISATION)
MainFrame:WaitForChild(IconName.Name).Action.MouseEnter:connect(function()
MainFrame:WaitForChild(IconName.Name).BackGround.ImageColor3 = Color3.fromRGB(75,75,75) --"255,255,255" is white (DEFAULT)
MainFrame:WaitForChild(IconName.Name).Text.TextColor3 = Color3.fromRGB(255,255,255) --"75,75,75" is grey (DEFAULT)
local MovinFrame = MainFrame:WaitForChild(IconName.Name)
------------Moving Stuff
MovinFrame:TweenSize(
UDim2.new(0, 1000, 0, 100),
Enum.EasingDirection.Out,
Enum.EasingStyle.Sine,
0.5,
true
)
MovinFrame.Text:TweenSize(
UDim2.new(0, 1000, 0, 100),
Enum.EasingDirection.Out,
Enum.EasingStyle.Sine,
0.5,
true
)
MovinFrame.Action:TweenSize(
UDim2.new(0, 1000, 0, 100),
Enum.EasingDirection.Out,
Enum.EasingStyle.Sine,
0.5,
true
)
MovinFrame.BackGround:TweenSize(
UDim2.new(0, 1000, 0, 100),
Enum.EasingDirection.Out,
Enum.EasingStyle.Sine,
0.5,
true
)
MovinFrame.BackGround.Text:TweenSize(
UDim2.new(0, 550, 0, 50),
Enum.EasingDirection.Out,
Enum.EasingStyle.Sine,
0.5,
true
)
end)
COMMUNITY QUESTION
Is there a way of simplifying this code? am going to have various icons
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
welp there's really only one way, by in pairs looping the children of MovinFrame and tweening all of them without having to write that 10 thousand times
?
do u know what an in pairs loop is
yea