Hi there, I am testing with remote events and my idea here, is to print a line out after the part is clicked, which fires a remote event. The problem here, is that the remote isn’t firing and the server is not receiving the click from the client. Note that the fire remote script is client and the onserverevent is server.
local
local part = script.Parent
local remote = game.ReplicatedStorage:WaitForChild("test")
local function test()
remote:FireServer()
end
part.ClickDetector.MouseClick:Connect(test)
server
local remote = game:GetService("ReplicatedStorage"):WaitForChild("test")
local function fired()
print("done")
end
remote.OnServerEvent:Connect(fired)
local remote = game:GetService("ReplicatedStorage"):WaitForChild("test")
local function fired(player)
print("done")
end
remote.OnServerEvent:Connect(fired)
Then what could be the issue here? If I removed the fire part in the local script and replaced it with a print function, it prints, but not with firing the remote. The remote is also in replicatedstorage.
local part = workspace:WaitForChild("test")
local remote = game.ReplicatedStorage:WaitForChild("test")
local function test()
remote:FireServer()
end
part.ClickDetector.MouseClick:Connect(test)