Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

WaitForChild is not a valid Member of player?

Asked by 4 years ago

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?!!!!

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

1 answer

Log in to vote
0
Answered by
Geobloxia 251 Moderation Voter
4 years ago

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.

Ad

Answer this question