hello!
im a beginner with remote events and i dont quite get them. please help, thanks
my code:
--local script
script.Parent.MouseButton1Click:Connect(function()
local number = 50
local rs = game:GetService("ReplicatedStorage")
local re = rs:WaitForChild("RemoteEvent")
re:FireServer(number)
print("sended")
end)
--server script
local rs = game:GetService("ReplicatedStorage")
local re = rs:WaitForChild("RemoteEvent")
re.OnServerEvent:Connect(function(number)
print("received number: "..number)
end)