Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

"Argument 1 missing or nil" error popping up on Output, any ideas?

Asked by 5 years ago

Hey, I was trying to make an donate surface. But my scripts arent working what is the problem?

GlobalScript:

script.Parent.MouseButton1Down:Connect(function(playerWhoClicked)
    local RemoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("DonateEvent")
    print(playerWhoClicked)
    RemoteEvent:FireClient(playerWhoClicked)
end)

LocalScript:

local RemoteEvent = game:GetService("ReplicatedStorage"):FindFirstChild("DonateEvent")

RemoteEvent.OnClientEvent:Connect(function(Player)
    local GUI = Player:FindFirstChild("PlayerGui"):WaitForChild("DonateGUI")

    GUI.DonateFrame:TweenPosition(UDim2.new(0.475, 0,0.451, 25),'Out','Sine',0.5)
end)

Output: Argument 1 missing or nil?

0
you can't get playerwhoclicked from mousebutton1down, therefore playerwhoclicked in the parameter will equal to nil radusavin366 617 — 5y

Answer this question