Remote event not working

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

This is the exact same thing I stated in this reply here:

Then again it’s good to reiterate as this could be a possible issue.

no real point in pointing out local as it doesn’t matter, not inside a function anyways
1 Like

Opps sorry didnt see that guess you got got it before me lol

1 Like

Still nothing. Checked the developer console no errors no warnings no printed messages. I checked and none of the scripts are disabled and i published and saved the game and refreshed the page and still nothing. And when i play the game from Roblox studio every one of my script works properly and no problems at all.

This completely slipped past my radar…

Why are you using the StarterGui on the server? When the player hits a keyboard key, it’s deleting the one in the StarterGui. Do player.PlayerGui instead.

edit hold up wrong person my bad, but I’m going to keep this here because that person did this wrong