I have a problem with firing a remote event in my script, for some reason, i can’t fire the remote event and it just returns an error that says “Argument 1 missing or nil”. Anyone suggestions on how to fix this?
local cd = script.Parent
local pond = cd.Parent
local db = false
local sp = game:GetService("StarterPack")
local rs = game:GetService("ReplicatedStorage")
local anim = pond.Animation
local fishing = rs.Fishing
cd.MouseClick:Connect(function()
if db == false then
print("fishing")
fishing:FireClient()
db = true
task.wait(1)
db = false
end
end)
cd.MouseHoverEnter:Connect(function()
local highlight = Instance.new("Highlight")
highlight.Parent = pond
highlight.Name = "pond"
highlight.FillTransparency = 0.9
end)
cd.MouseHoverLeave:Connect(function()
local highlight = pond:WaitForChild("pond")
highlight:Destroy()
end)