Hello, so today I’m writing because I keep getting this error when I’m calling the PlayerGui.![]()
Here’s the code I’m using.
local PlayerGui = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
script.ScreenGui.Parent = PlayerGui
local ScreenGui = PlayerGui.ScreenGui
wait(.05)
local Image = ScreenGui.MainFrame.GroupImage
game:IsLoaded()
Image:TweenPosition(UDim2.new({0.242, 0},{0.076, 0}), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, .3, true)
game.ReplicatedFirst:RemoveDefaultLoadingScreen()
if not game:IsLoaded() then
game.Loaded:Wait()
end
wait(5)
Image:TweenPosition(UDim2.new({2, 0},{0.076, 0}), Enum.EasingDirection.In, Enum.EasingStyle.Bounce, .3, true)
wait(1)
script.ScreenGui:Destroy()