local RemoteEvent = yourRemoteEvent --for eg game.ReplicatedStorage.RespawnEvent
script.Parent.MouseButton1Click:Connect(function()
RemoteEvent:Fire()
end)
and in other script in ServerScriptService
local RemoteEvent = yourRemoteEvent --for eg game.ReplicatedStorage.RespawnEvent
RemoteEvent.OnServerEvent:Connect(function(player) --player comes as default
player:LoadCharacter()
end)
Remote Events are used to communicate between the client and the server, not between 2 server scripts. To communicate between 2 server scripts, use a BindableEvent: