So my scripts are working as intended but they are still showings errors … It’s for a loading screen:
They’re showing these errors: (this is the 1st code)
(this is the 2nd code)
I tried relaunching studio but it’s still showing me these errors
The scripts are working but it’s just strange because i’m almost sure that I made no mistake while scripting. (Or maybe yes)
If you do find a mistake please tell me!
1st code:
game.Players.PlayerAdded:connect(function(player)
local gui = game.ReplicatedStorage:WaitForChild(“EcranDeChargement”):Clone()
gui.Parent = player.PlayerGui
gui.Script.Disabled = false
end
2nd code:
script.Parent.Frame.Visible = true
local contentprovider = game.ContentProvider
while wait() do
if contentprovider.RequestQueueSize == 0 then
script.Parent.Frame:TweenPosition(UDim2.new(0, 0, -1, 0),“In”,“Quart”)
wait(1)
script.Parent:Destroy()
end
end
On your 1st code. Did you forget to close the connect with )?
For your 2nd code, try checking if the parent exists first, before running script.Parent.Frame:TweenPosition(UDim2.new(0, 0, -1, 0),“In”,“Quart”), as it looks like script.Parent no longer exists once you did script.Parent:Destroy() thus it’ll return nil if it didn’t exist.