I created a chunk of code that is meant to create a frame.
Line 42 - 46
Please Help Me Fix This.
local MainMenu = script.Parent
local PlayButton = MainMenu.Buttons:WaitForChild("PlayButton")
local SettingsButton = MainMenu.Buttons:WaitForChild("SettingsButton")
local UpdateButton = MainMenu.Buttons:WaitForChild("UpdateButton")
local Player = game.Players.LocalPlayer
-- UI Hover
-- Player Button
PlayButton.MouseEnter:Connect(function()
PlayButton.TextColor3 = Color3.new(0.133333, 0.133333, 0.133333)
end)
PlayButton.MouseLeave:Connect(function()
PlayButton.TextColor3 = Color3.new(0,0,0)
end)
-- Settings Button
SettingsButton.MouseEnter:Connect(function()
SettingsButton.TextColor3 = Color3.new(0.133333, 0.133333, 0.133333)
end)
SettingsButton.MouseLeave:Connect(function()
SettingsButton.TextColor3 = Color3.new(0, 0, 0)
end)
-- Update Button
UpdateButton.MouseEnter:Connect(function()
UpdateButton.TextColor3 = Color3.new(0.133333, 0.133333, 0.133333)
end)
UpdateButton.MouseLeave:Connect(function()
UpdateButton.TextColor3 = Color3.new(0, 0, 0)
end)
-- Main Scripting
PlayButton.MouseButton1Click:Connect(function()
local FadeInEffect = Instance.new("Frame")
FadeInEffect.Name = "FadeInFrame"
FadeInEffect.BackgroundColor3 = Color3.new(0.133333, 0.133333, 0.133333)
FadeInEffect.Parent = MainMenu
end)

1 comment
I suggest just making a frame through starterGui, but if you insist on doing it this way, make sure you put this into a local script.