I am making an RPG. But I'm having this issue with this Server Script.
My problem is that this this Script isn't opening up a GUI for me.
Here is the script.
script.Parent.DialogChoiceSelected:connect(function(player,dialog) local gui = script.Parent.ScreenGui if dialog.Name=="Choice1" then gui:Clone().Parent = player.PlayerGui end end)
This script used to work when FilterEnabled was off.
I'm really confused with this as I'm a newbie at scripting. I've asked this question many times, and scripters are answering to use a RemoteEvent.
I'm not sure what a RemoteEvent is yet. But if you can help me, please give a clear answer for me.
Alright.
This depends..
If you just want to set something off without a callback (ex. return (variables)) then you will want to use "RemoteEvent", if you do want to use callbacks, then use "RemoteFunctions"
First, Create A remoteEvent inside of ReplicatedStorage. Setup the script inside the GUI Then, send the variables you need. --Client Side GUI
local myRemote = game.ReplicatedStorage.MyRemoteEvent myRemote:FireServer("Argument1", "Argument2", "Argument3")
-- Server Side
local myRemote = game.ReplicatedStorage.MyRemoteEvent myRemote.OnServerEvent:connect(function(playerWhoSent, Argument1, Argument2, Argument3) print(playerWhoSent.Name.." has just sent the server ".. tostring(Argument1).." as argument1!") end)
This is a basic explanation. Hope this helped.