So I wanted to make a shop here you get a gun onClick. Well I have programmed it. But it doesnt work.
function onClicked(player) if game.Players:FindFirstChild(player.Name).leaderstats.Coins.Value >= 2000 then local copy = game.Workspace.M1GarandParent.M1Garand:Clone() copy.Parent = game.Players:FindFirstChile(player.Name).Backpack game.Players:FindFirstChild(player.Name).leaderstats.Coins.Value = game.Players:FindFirstChild(player.Name).leaderstats.Coins.Value - 2000 end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
Line 5 says 'FindFirstChile' rather than 'FindFirstChild.'