Trying to send variables from a Local Script to a normal Script. I coded it to print the variables after being sent (to Script) but I keep getting "nil". I've tried searching it up on Google but no success. (New to scripting so please forgive me if there are any idiotic errors)
Local Script:
local MorseCodePassing = game.ReplicatedStorage:WaitForChild("MorseCodePassing")
local name = "A"
local morsetext = ".-"
script.Parent.MouseButton1Click:Connect(function(name, morsetext)
function Button(name, morsetext)
if game.StarterGui.LettersMenu.Frame.Visible == false then
game.StarterGui.LettersMenu.Frame.Visible = true
end
MorseCodePassing:FireServer(name, morsetext)
end
end)
Normal Script:
local MorseCodePassing = game.ReplicatedStorage:WaitForChild("MorseCodePassing")
MorseCodePassing.OnServerEvent:Connect(name, morsetext)
print(name)
print(morsetext)

2 comments
You are the best
No Your The Best For Accepting My Answer