Game intro not playing but I don't see any errors in the output?

Hello everyone,

I’m currently experiencing an issue where the intro to my game isn’t playing but I’m not getting any errors related to it in the output. I was watching a tutorial from Gamer M8 and followed through with them to make but of course I need to add a few extra things for my situation. He was mainly working with just a TextLabel and ImageLabel while I’m working with
5 different ImageLabels.

How things are set up:

Replicated Storage:
RemoteEvent named “IntroEvent”

Script in ServerScriptService:
image

StarterGui:
image

The code inside the LocalScript:



image

As you see, there’s no errors in the output relating to any of this but still doesn’t play?

What have I tried?

Rewatched his video several times and took a good look at my code. Everything looked fine and almost the same as his yet it didn’t play for me. Even though I don’t specialize in scripting and have an ok understanding on how half of the things work, I’m sure there’s some small changes that I’d have to make but I wouldn’t know what right away. I’d appreciate any help as I’m sure I’m close to figuring this out but need a hand from someone experienced to assist me with this little issue!

1 Like

Im going to say from a plain view that your tables don’t actually include anything (meaning the content is nil)

Try printing the tables in the local script AFTER line 42 and see what it returns out, looks like a rookie mistake to me

This is happening because the client has connected to the remote before it was fired. I would do a RemoteFunction, then keep invoking it until the client responds (return true)

Server

repeat wait()
   local responded = RemoteFunction:InvokeClient(Player)
until responded == true

Client

Remote.OnClientInvoke = function()
   spawn(function()
    -- code here
   end)
return true
end

What is the purpose of you using a repeat until loop? You’re polling which is bad but that doesn’t matter since RemoteFunctions yields the program until it gets a response, also you shouldn’t use remoteFunctions from the server due to these reasons, as per the RemoteFunction page:

  • If the client throws an error, the server will throw the error too.
  • If the client disconnects while it’s being invoked, the InvokeClient() call will error.
  • If the client never returns a value, the server will hang forever.

Secondly, spawn will be depreciated soon and it’s better to either use task.spawn or coroutines.

Finally, RemoteFunctions should only be used when you need a return value. You do not need the return value for this.

image

Tried it and it gave me an error now?


Yes, this is because RemoteEvent’s don’t use OnClientInvoke they use OnClientEvent

Try changing line 5 to local ScreenGui = script.Parent

Changed it to that now got another error

Also tried that right now and it didn’t really do anything, not sure why.

I’m also concerned about “Player” being underlined though, what happened there?
image

Revert your code how it used to be, since you’re using remote function events which aren’t needed.

1 Like

I think all you need is just removing the end in line 7
image

1 Like

Reverted it, what would I do now that everything is set back to what was giving me the initial issue?

Change line 3 to

local RemoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("IntroEvent")

Change line 5 to

local ScreenGui = script.Parent

My assumption is that it is a variable issue as it’s erroring near them.

Figured how to do it, all I had to do the whole time is add Tween behind the ImageLabel’s names at the bottom.

1 Like