Im unsure on how I would make i print what is what just so I can get the basics.
local Script in GUI
script.Parent.MouseButton1Click:Connect(function()
local Crack = game.ReplicatedStorage.Money.Add.Code:InvokeServer()
if Crack == "1" then
print("Crack is 1")
elseif Crack == "2" then
print("Crack is 2")
elseif Crack == "3" then
print("Crack is 3")
elseif Crack == "4" then
print("Crack is 4")
elseif Crack == "5" then
print("Crack is 5")
elseif Crack == "6" then
print("Crack is 6")
end
end)
ServerScript In ServerScriptService
game.ReplicatedStorage.Money.Add.Code.OnServerInvoke(ReturnValue)
function ReturnValue()
local Value = math.random(1,6)
print(Value)
return Value
end
Nothing Prints or returns. I already read the wiki but still don't understand how to do it. How can I make this work so I can further understand it?

4 comments
Your explaination might be a bit confusing. You could just say that OnServerInvoke is a callback, unlike OnServerEvent which is an event
Still isn't working I somewhat understand it more but it won't print the value on the other side of the script
other side being the Local Script side?
Yeah