Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Argument 1 is not missing. but why does it say it is missing?(RemoteEvents)

game.ReplicatedStorage.GetBag.OnServerEvent:Connect(function(player, bag)
&	local a = game.Workspace.Bags:FindFirstChild(bag):Clone()
	a.Parent = player.Character
	a.Handle.Anchored = false
	player.bagName.Value = bag
end)

For some reason it says 'argument 1 missing or nil' in the place where the ampersand(&) is. Can anybody help?

2 comments

0

it means 'bag' doesn't exist

0

is it possible that 'bag' was created on the client? it won't be replicated otherwise

1 answer

:FindFirstChild takes a string, because it for an instance by its name. local a = game.Workspace.Bags:FindFirstChild(bag.Name):Clone().

This discussion is preserved as it was. New answers, comments, and votes are closed.