Remote event not working

I have never understood remote events they are really confusing and tutorials are unrelated to what im trying to do.

Check that scripts are not disabled. Also, why are you using a remote event for this? It does only print “Event fired”

i think you should delete the GUI by using serverscript, try to trigger the server by putting it into the if statement in localscript and proceed to delete the GUI from server

I don’t know what to suggest you anymore honestly. I tried your exact same thing and it worked fine for me.

The scripts arent disabled i checked and im using a remote event to do what i said in the post either way it wouldnt work since roblox loves to keep things hard.

@YoloGamer564 @DEVLocalPlayer I am done with the tutorial! I hope this helps you to fix the script!

1 Like

Where is the local script? Is it in startergui? I usually put my remote event inside of the local script. Then put a server script inside the remote event. This makes things easier.

Yes the localscript is in the StarterGui and the rest of my GUI is in the localscript.

Sorry but i have no clue what you are saying since i also have no clue what im doing and also this is so confusing although thanks for trying to help me.

Yes i refreshed the page, saved it several times and published it also several times.

--local
script.RemoteEvent:FireServer()
--server
script.Parent.OnServerEvent:Connect(function()
        print("fired")
end)

This is what my previous post was talking about. My script.

Exact same thing i do except the “script” i refer to as “game” and “Parent” i refer to as “ReplicatedStorage” since my remote event is found there.

What is StarterScreenGUI? If you’re trying to properly reference a GUI, then you shouldn’t be doing it like that. If your script is a child of the GUI object do not do script.YourNameHere as that will descend and attempt to find children of the script.

Don’t be one of those people who use StarterGui because it won’t work.

Make the LocalScript a child of the GUI object.

Then change the variable you made for the GUI object to this

GUI = script.Parent

That will properly get the parent (which is the GUI object) while having the LocalScript that deletes the GUI a child of that GUI object.

Ok, so this is how i am gonna do it:

local userinputservice = game:GetService("UserInputService")

userinputservice.InputBegan:Connect(function(input, gameProcessedEvent)
	

	if input.UserInputType == Enum.UserInputType.Keyboard then
		print("Player has pressed keyboard")
		
	         game.ReplicatedStorage.RemoteEventPressAnyKeyToStartTheGame:FireServer()
		end
	
	
	
	
	
end)
localscript
game.ReplicatedStorage.RemoteEventPressAnyKeyToStartTheGame.OnServerEvent:Connect(function(player)
	
	player.PlayerGui.StarterScreenGUI:Destroy()
	print("Event fired")
end)

Still nothing works. I opened developer console in roblox game and there are no errors, no warnings and no printed messages.

StarterScreenGui is ScreenGui. I just renamed it to StarterScreenGui because thats what the player will see first when he enters the game.

1 Like

Wouldnt be better to the have local script a child of the gui instead of having it be the parent of the gui?
Since you can actually see it? Also a picture of the workspace would help

I will just edit my post and upload a picture of my explorer and how are they looking right now.

Okay so i edited my post above and thats how my Explorer looks right now.

1 Like

StarterScreenGUI is not a child of script i recommend putting the script inside the gui and changing it to

local GUI = script.Parent