Receiving "Argument 1 missing or null". Where am I going wrong?

Hello!
I have previously sent a topic about this but sent it by accident, so please ignore that.

Anyways, I am currently working on a script where the GUI will tween the buttons only when the player sits down. I am using two scripts as one of them will open the GUI when the player sits down, and the local script where it will tween the GUI. A remote event has been used to send a signal to the local script.

However, I am facing a problem with the GUI because it would not animate. I have checked the Output and said “Argument 1 missing or null”. I do not know what is wrong with my script. It seems to be affecting Line 8 of my main script.

Main Script:

function giveTool(weldchild)
local findhuman = weldchild.Part1.Parent:FindFirstChild("Humanoid")
if (findhuman ~= nil) then
	local player = game.Players:GetPlayerFromCharacter(findhuman.Parent)
	if (player ~=nil) then
		gui = script.Parent.IFE:Clone()
		gui.Parent = player.PlayerGui
		game.ReplicatedStorage.SendIFE:FireClient()
		end
	end
end

function removeTool()
if (gui ~= nil) then
	gui:Remove()
end
end

script.Parent.ChildAdded:connect(giveTool)
script.Parent.ChildRemoved:connect(removeTool)

--Seatnumber

script.Parent.IFE.Screen.Main.TopBar.SeatNumber.Text = script.Parent.Name

Local Script:

game.ReplicatedStorage.SendIFE.OnClientEvent:Connect(function()
wait(3)
script.Parent.Logo:TweenPosition(UDim2.new(0.01, 0,0.012, 0),"Out","Sine",1)

script.Parent.TextLabel:TweenPosition(UDim2.new(0.473, 0,0.359, 0),"Out","Sine",1)
wait(0.05)
local TweenPart = script.Parent.TextLabel
local Tweeninfo = TweenInfo.new()
local aim = {}
aim.TextTransparency = 0
local Tween = game:GetService("TweenService"):Create(TweenPart,Tweeninfo,aim)
Tween:Play()

wait(1)
script.Parent.StartButton:TweenPosition(UDim2.new(0.387, 0,0.73, 0),"Out","Sine",1)
end)

The error is coming from this line of code:

game.ReplicatedStorage.SendIFE:FireClient()

Everything seems to be in the correct position but I don’t understand what’s wrong.

You aren’t passing in a player to FireClient which you need to do. If you want to fire the event for all players then use FireAllClients. Though, I think in this case you want to pass in the player you defined above. Just use :FireClient(player) instead of :FireClient() and see if that does what you want it to.

Ah, thank you it worked. :smiley: