epoke466
(Ethan)
1
I am making a fishing rod, but I am getting a very weird error.
This doesn’t make since to me because here is the explorer:
If there is an error in my code this is it:
script.Parent.StartNumberDropRE.OnClientEvent:Connect(function(Number)
local function IDK()
Number.Value = Number.Value + 10
end
game:GetService("ContextActionService"):BindAction("NumberChangeClick", IDK, false, Enum.UserInputType.MouseButton1, Enum.UserInputType.Touch, Enum.KeyCode.ButtonR1)
script.Parent.FinishNumberDropRE.OnClientEvent:Wait()
game:GetService("ContextActionService"):UnbindAction("NumberChangeClick")
end)
I would really love some help with this. I have tried a couple things but none of them worked.
1 Like
Have you tried script.Parent:WaitForChild('FinishNumberDropRE') or script.Parent:FindFirstChild('FinishNumberDropRE') instead?
You can also try making it a variable.
local FinishNumberDropRE = script.Parent:WaitForChild('FinishNumberDropRE')
script.Parent:FindFirstChild('StartNumberDropRE').OnClientEvent:Connect(function(Number)
local function IDK()
Number.Value = Number.Value + 10
end
game:GetService("ContextActionService"):BindAction("NumberChangeClick", IDK, false, Enum.UserInputType.MouseButton1, Enum.UserInputType.Touch, Enum.KeyCode.ButtonR1)
FinishNumberDropRE.OnClientEvent:Wait()
game:GetService("ContextActionService"):UnbindAction("NumberChangeClick")
end)
1 Like
epoke466
(Ethan)
3
Thats a good idea, I’ll try it.
1 Like