Problem with Remote Event

Hello!
I’m trying to make a remote event work.
But, when I tried scripting it doesn’t work and tells me that a Remote Event can only be fired from the Client.
I have tried searching it on developer.roblox.com, but I could not find anything.
So what I’m trying to make is that when a part is clicked (clickdetector) something will happen.

-- Code in part where the remote event is going to be fired (script)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local click = script.Parent.ClickDetector
local meetingevent = ReplicatedStorage:WaitForChild("MeetingEvent")

click.MouseClick:Connect(function(player)
	meetingevent:FireServer()
end)
-- Code in ServerScriptService, where the script is listening for the RemoteEvent. (script, not localscript)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("MeetingEvent")

local function onCreateMeeting(player)
	print(player.Name .. "called a meeting")
	
end
remoteEvent.OnServerEvent:Connect(onCreateMeeting)

Thanks for reading :slight_smile:

Remote events are used to communicate from the local script and server script(or the other way round). It’s impossible fire and receive a remote event on one script.

So the script should be a local one?

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local click = script.Parent.ClickDetector

local function onCreateMeeting(player)
	print(player.Name .. "called a meeting")
	
end

click.MouseClick:Connect(function(player)
	onCreateMeeting(player)
end)

Try this @FrankieRichBoy

You can use BindableEvents for communicating between same types of script instead if that’s what are you trying to do.

This worked. Thanks for helping.