This script is functional is studio but doesn't seem to work correctly in a server.
THIS SCRIPT IS IN A LOCALSCRIPT
Error Code Is: <"Title is not a valid member of Frame">
The structure of the GUI is:
Title -(ScreenGui) <Parent of all Below>
Block -(Frame) <Child of Title>
EerieMusic -(Sound) <Child of Block>
Thump -(Sound) <Child of Block>
MainFrame -(This is the LocalScript) <Child of Block>
Title -(This is the troubled TextLabel thats giving me errors) <Child of Block>
local found = game.Players.LocalPlayer:FindFirstChild("PlayerGui") local gui = found:FindFirstChild("Title") if found then if gui then gui.Block.EerieMusic:Play() for i=1,0,-.01 do gui.Block.BackgroundTransparency = i gui.Block.Title.TextTransparency = i wait() end gui.Block.EerieMusic:Stop() gui.Block.BackgroundColor3 = Color3.fromRGB(0, 0, 0) gui.Block.Thump:Play() end end if gui.Block.Title ~= nil then print(gui.Block.Name .. " is failing") end
What you did wrong was that you were trying to findfirstchild when the gui hasnt been loaded onto playergui. The below script should be ready to use:
Script
found = game.Players.LocalPlayer:WaitForChild("PlayerGui") gui = found:WaitForChild("Title") if found then if gui then gui.Block.EerieMusic:Play() for i=1,0,-.01 do gui.Block.BackgroundTransparency = i gui.Block.Title.TextTransparency = i wait() end gui.Block.EerieMusic:Stop() gui.Block.BackgroundColor3 = Color3.fromRGB(0, 0, 0) gui.Block.Thump:Play() end end if gui.Block.Title ~= nil then print(gui.Block.Name .. " is failing") end
If this answers your question, make sure to upvote. Thank you!!