local p = game.Players.LocalPlayer local m = p:GetMouse() local t = script.Parent local r = script.Parent.RemoteEvent local function a () local t = m.Target r:FireServer(t) end t.Activated:Connect(a)
Error on line 4, Client/Server side shows the RemoteEvent inside the tool.
EDIT : It's a LocalScript.. obviously and it is inside the tool.. obviously.
It's probably not existed at that time so do
local r = script.Parent:WaitForChild("RemoteEvent")