Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Remote Event Problem. How Can I Solve It ?

Asked by 3 years ago
--LocalScript
mouse.Button1Down:Connect(function()
    local target = mouse.Target
    local event = game.ReplicatedStorage.Events
    print(target.Name)
    event.Place:FireServer(target)
end)

--Script

local Events = game.ReplicatedStorage.Events
Events.Place.OnServerEvent:Connect(function(plr , target)
    print(target.Name)

end)

Local Script Perfectly prints the target's name but serverside script returns nil

0
i made local mouse = game.Players.LocalPlayer:GetMouse() btw Omerevkizel 27 — 3y
0
Does the target exist on the server? radiant_Light203 1166 — 3y
0
First Thing I Would Recomend Is Putting The RemoteEvent In The Workspace. I Have Tryed What You Are Doing Multiple Times And It Did Not Work Until I Put The RemoteEvent In Workspace. CallMe_Axis 63 — 3y
0
When the server script returns/prints nil, is your mouse over a part? That is the only thing I can think of because it works fine for me appxritixn 2235 — 3y
0
1- Target isnt nil because localscript perfectly prints target. Omerevkizel 27 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

It didnt because target was in client not server XD. Im sorry for everything

Ad

Answer this question