I've been creating an intro gui that works perfectly within studio, however when I publish it to the game of its purpose, it breaks down and everything is stuck. What is the cause for this issue? How can I fix it? I've checked internal problems and it does show an error "Play is not a valid member of ScreenGui". I'm also wondering if WaitForChild(child) could be implemented somewhere, but I'm not sure where.
This is the main programming script. Yes I have all configurations and slides within the gui.
local Screen = script.Parent
local Config = Screen.Config
local Player = Screen.Parent.Parent
local Filter = Screen.Filter
local Content = Screen.Content
local Play = Screen.Play
function FilterFade(start,finish,step)
for i = start,finish,0.03/step do
Filter.BackgroundTransparency = i
wait()
end
Filter.BackgroundTransparency = finish
end
if not Player:FindFirstChild(Config.TAG_NAME.Value) then
local tag = Instance.new("IntValue")
tag.Name = Config.TAG_NAME.Value
tag.Parent = Player
Filter.Visible = true
for _,image in pairs(Content:GetChildren()) do image.Visible = false end
wait(Config.Padding_Time.Value)
for _,image in pairs(Content:GetChildren()) do
image.Visible = true
FilterFade(0,1,Config.Fade_Time.Value)
wait(Config.Display_Time.Value)
FilterFade(1,0,-Config.Fade_Time.Value)
image.Visible = false
wait(Config.Display_Time.Value)
end
wait(Config.Padding_Time.Value)
Screen.Background.BackgroundTransparency = 0.7
Filter.BackgroundTransparency = 0.7
wait(2)
script.Parent:remove()
end

1 comment
Is this in a Localscript?