I’m creating a game and i’m not expert at scripting, i just know the basics.
It was going everything fine but my remote events just stopped working, i dont know the reason
Can you help me please?
Here’s the explanation:
The Remote Event is called “ButtonClicked” and is in ReplicatedStorage already
This code is in the Starter Player’s Script and fires the Server
local remoteEvent = game.ReplicatedStorage:WaitForChild("ButtonClicked")
local ClickDetector2 = game.Workspace.Button2.ClickDetector
ClickDetector2.MouseClick:Connect(function()
remoteEvent:FireServer()
end)
This code is in the Server Script Service and receives the signal Server Side
local remoteEvent = game.ReplicatedStorage:WaitForChild("ButtonClicked")
remoteEvent.OnServerEvent:Connect(function()
print("Hi")
end)
It’s a simple code that i was testing but it just doesn’t work…