I am using remote events. I get the errors:
Attempt to connect failed: Passed value is not a function --and
attempt to call a nil value
How can I fix this? I don’t understand what these errors mean
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local plnm = ReplicatedStorage:WaitForChild("sendp")
seat:GetPropertyChangedSignal("Occupant"):Connect(function()
if _workspace.Up.VehicleSeat.Occupant ~= nil then
local humanoid = seat.Occupant
if humanoid then
local player = game:GetService("Players"):GetPlayerFromCharacter(humanoid.Parent)
plnm:FireClient(player)
-------------------------------------local script below
local plnm = ReplicatedStorage:WaitForChild("sendp")
local seat = script.Parent
local findit
local function namereceive(player)
findit = player
end
plnm.OnClientEvent:Connect(namereceive())