Custom dialog box scripts not working

  1. What do you want to achieve? Have a module script fire a remoteEvent when a localscript is getting the info of the module.

  2. What is the issue? Script won’t show custom dialog

  3. What solutions have you tried so far? N/A

Ok I tried to make a script that would call the module script to make a dialog box show up. I’m not exactly sure what’s going on so Imma so you pictures of it now:

Examples so far:

I’m a little confused because it’s rushed

Edit: I made it easier by simply printing it

Can you show us the code that handles the remote event Workspace.Main.Dialog?

Also did it print the string "HELLO" when you edited the function to call print on the input of the function ShowMessage rather then send it to the server using the remote event Worksapce.Main.Dialog?

1 Like

Yes. in the function it did print hello.

Then I will reiterate what I said in my last post.

It would be helpful if we could see your code so we can perhaps further deduce the issue.

ignore the rest of the code just read modle:ShowMessage

Did I already show you this?

Did you mean this?

while running modules will not execute if not called

Yes you already showed me that.

I am interested in the code that handles the OnServerEvent signal for the workspace.Main.Dialog RemoteEvent. Not the code you have showed me.

more looks like OnClientEvent i think

Your script here:

Looks like it is a LocalScript. And it looks like you’re trying to handle the RemoteEvent on the client when the :FireServer is on the client. You have a significant problem in a lot of the code here.

What you will need to do is ship the code handling the Remote to the server and to instead use OnServerEvent and you will have to change how you reference the variables like Window and Player.

Perhaps you should try reading this (and if you have, read it again):


local Dialog = {}

function Dialog:ShowMessage(Message)

return Dialog


local Dialog = require(game.ReplicatedStorage.Modules.Dialog)



workspace.Main.Dialog.OnServerEvent:Connect(function(Player, Message)

Does it output the Message? If so you can then likely integrate your other functionality. If not, any errors?

yes and I completed it (kinda, I want another dialog to show just after that dialog was just closed)

workspace.Main.Dialog.OnServerEvent:Connect(function(Player, Message)
	local PlayerGui = Player:WaitForChild("PlayerGui")
	local MainGui = PlayerGui:WaitForChild("MainGui")
	local Dialog = MainGui["Main"]["Dialog"]
	local Label = Dialog.Label
	Label.Text = Message
	Dialog.Visible = true
	local Ok = Dialog["Ok"]
		Dialog.Visible = false

In action: