Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Remote Event Problem. How Can I Solve It ?

--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

5 comments

0

i made local mouse = game.Players.LocalPlayer:GetMouse() btw

0

Does the target exist on the server?

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.

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

0

1- Target isnt nil because localscript perfectly prints target.

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.