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

WaitForChild is not a valid Member of player?

Im trying to make a gamepass and I keep getting this error message in the output "WaitForChild is not a valid member of player" local mps = game:GetService("MarketplaceService") local gamepass_id = 8614520

game.Players.PlayerAdded:Connect(function(player) if mps:UserOwnsGamePassAsync(player.UserId, gamepass_id) then game.ServerStorage.SpeedCoil:Clone().Parent = player:WaitforChild("Backpack") game.ServerStorage.SpeedCoil:Clone().Parent = player:WaitForChild("StarterGear") end end)

game.ReplicatedStorage.Give.OnServerEvent:connect(function(player) game.ServerStorage.SpeedCoil:Clone().Parent = player:WaitforChild("Backpack") game.ServerStorage.SpeedCoil:Clone().Parent = player:WaitForChild("StarterGear") end) help?!!!!

1 comment

0

Could you make it a code block please? https://scriptinghelpers.org/help/how-post-good-questions-answers Scroll down and read about Formatting

1 answer

For the line: "game.ServerStorage.SpeedCoil:Clone().Parent = player:WaitforChild("Backpack") " It is WaitforChild instead of WaitForChild. You didn't capitalize the f in for. Also, instead of using ServerStorage to replicate objects, use ReplicatedStorage as in its name. Don't use lighting though, it is easily exploitable.

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