--//Variables\\--
local TweenService = game:GetService("TweenService")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local introFrame = script.Parent.introFrame
local introGUI = script.Parent
local playBtn = introFrame:FindFirstChild("playBtn")
local shopBtn = introFrame:FindFirstChild("shopBtn")
local customizeBtn = introFrame:FindFirstChild("customizeBtn")
local HoverOverPlayBtn = TweenService:Create(playBtn, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = UDim2.new(1, 0, 0.5 ,0)})
local LeavePlayBtn = TweenService:Create(playBtn, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = UDim2.new(0.9, 0, 0.1, 0)})
--//Functions\\--
local function deleteStartScreen()
	ReplicatedFirst:RemoveDefualtLoadingScreen()
end

local function shopOpen()
	-------------------------
end

local function waitForLoad()
	repeat wait() until game:IsLoaded()
end

--//OBJ\\--
deleteStartScreen()
waitForLoad()
playBtn.MouseEnter:Connect(function()
HoverOverPlayBtn:play()
end)

I don't see why this doesn't work Help?

2 comments

1

introFrame:WaitForChild("playBtn")

0

As Feahren said use WaitForChild. A script will not know when something has finished loading so we use waitForChild to yeild the code until a child is loaded wtih the given name.