Argument 1 missing or nil error

I’m trying to add Remote Events for my shop GUI Script, but I cant get it to work.

image
Error:
Fade:FireClient()

Script:

local Fade = game.ReplicatedStorage:WaitForChild("TeleportationDoorEvent")
local Cutscene2 = game.ReplicatedStorage:WaitForChild("GasStationScene2")
local StopScene = game.ReplicatedStorage:WaitForChild("StopScene") 

OpenUI.OnClientEvent:Connect(function()

	script.Parent.Visible = true
	local String = "What are you looking for?"
	task.wait()
	local Length = string.len(String)
	UpdateText(Length, String)

end)


UpdateText = function(Length, String)

	for i = 1, Length do
		script.Parent.TEXT.Text = string.sub(String, 1, i)
		task.wait(0.10)
	end
end


script.Parent.Purchase.MouseButton1Click:Connect(function()

	local String2 = "Alright... Here's what I sell my man."
	task.wait()
	local Length = string.len(String2)
	UpdateText(Length, String2)
	task.wait(3)
	Fade:FireClient()
	task.wait(0.02)
	StopScene:FireClient()
	task.wait(0.02)
	Cutscene2:FireClient()

end)

UpdateText = function(Length, String2)

	for i = 1, Length do
		script.Parent.TEXT.Text = string.sub(String2, 1, i)
		task.wait(0.10)
	end
end ```

![image|430x23](upload://xoxgVHNkhy9HXC07jBDduq37GSh.png)
Error Right here:

can you send your server script
what’s probably happening here is your passing a parameter through from the server script, but not recalling it on the client side

1 Like

The error is saying you aren’t passing an argument through RemoteEvent:FireClient(). It expects a player in the argument. Maybe you are looking for RemoteEvent:FireAllClients() ?

1 Like

is supposed to have a player in those parameters

also if this is a GUI then you should have all this be seperate in seperate scripts
example:
local script( that handles client interactions and inputs.. like Mousebutton1Up)

serverScripts
also it seems like you do not need to communicate to the server at all for this interaction. this looks to be strictly client based.. if Im reading this correctly

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.