I've put a local script that will fire server into StarterCharacter Scripts, the server side script into ServerScriptService and put the remote event in replicated storage, but client just won't fire server.
Client Side
local userInput = game:GetService("UserInputService")
local cam = workspace.CurrentCamera
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local localPlayers = Players.LocalPlayer
local Mouse = localPlayers:GetMouse()
local StarterGui = game:GetService("StarterGui")
local target
local selected = {}
local moveUnit = ReplicatedStorage:WaitForChild("StartMoveUnit")
local RemoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")
function hit(userInput, cam)
-- Get mouse position:
local mousePos = userInput:GetMouseLocation()
-- Get the ray from the mouse and project it 1000 studs forward:
local mouseRay = cam:ViewportPointToRay(mousePos.X, mousePos.Y)
mouseRay = Ray.new(mouseRay.Origin, mouseRay.Direction * 1000)
-- Cast the ray:
local target, hit = workspace:FindPartOnRay(mouseRay)
return hit
end
function isInTable(selected,toFind)
local found = false
for i = 1, #selected, 1 do
if toFind == selected[i] then
found = true
break
end
end
return found
end
Mouse.Move:Connect(function()
if target ~= nil then
if target:FindFirstChild("IsUnit") and isInTable(selected, target) == false then
target.Highlight.Transparency = 1
end
end
target = Mouse.Target
if target and target:FindFirstChild("IsUnit") then
target.Highlight.Transparency = 0.5
end
end)
Mouse.Button1Down:Connect(function()
local alreadySelected = false
target = Mouse.Target
local i
alreadySelected = isInTable(selected, target)
for i = #selected, 1, -1 do
selected[i]:WaitForChild("Highlight").Transparency = 1
table.remove(selected, i)
end
if alreadySelected == false then
if target:FindFirstChild("IsUnit") then
table.insert(selected, target)
target.Highlight.Transparency = 0.5
end
end
end)
Mouse.Button2Down:Connect(function()
local location = hit(userInput, workspace.CurrentCamera)
local willMove
print(location)
if selected[1] then
for i = 1, #selected, 1 do
willMove = selected[i]
moveUnit:FireServer(willMove, location)
end
end
end)
Server Side
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local moveUnit = ReplicatedStorage:WaitForChild("StartMoveUnit")
local tweenService = game:GetService("TweenService")
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local RemoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")
local info = TweenInfo.new(
2,
Enum.EasingStyle.Linear,
-1,
Enum.EasingDirection.Out,
0
)
moveUnit.OnServerEvent:Connect(function(player,selected, location)
print("moving")
local goal = CFrame.new(location)
local Tween = TweenService:Create(selected,info,goal)
Tween:Play()
wait(2)
Tween:Stop()
end)

3 comments
Use the print() command under every line that runs and see when the prints stop, that's where the error is... if all of them run then you have everything correct in theory but something is referenced wrong.
I put print() command after it firesserver in the for loop, before fire server in the for loop, in the server side connect script, but they all print out except server side. Server side never connects.
Um you sure you aren't firing the wrong event? Or receiving the wrong event on server side?