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

?pledge is not a valid member of players. Help!

Asked by 5 years ago
Edited 5 years ago

pledge is not a valid member of Players

117:08:59.934 - Stack Begin
217:08:59.934 - Script 'Workspace.teamhandler', Line 6 - upvalue destroyAccessories
317:08:59.935 - Script 'Workspace.teamhandler', Line 30
417:08:59.935 - Stack End

Script:

01local Players = game:GetService("Players")
02local RunService = game:GetService("RunService")
03 
04-- Check if the given object is an Accessory (such as a hat)
05local function destroyAccessories(object, pledge)
06    if game.Players.pledge.Team == "blue" then
07        game.Players.pledge.Character.Shirt = 28578328
08        game.Players.pledge.Character.Pants = 28578478
09        local bat = game.Workspace.b.BluePaintballMask:Clone()
10        bat.Parent = pledge
11        local bg = game.Lighting["Paintball Gun (Blue)"]:Clone()
12        bg.Parent = pledge
13    else
14        game.Players.pledge.Character.Shirt = 28578907
15        game.Players.pledge.Character.Pants = 28578865
View all 42 lines...

2 answers

Log in to vote
0
Answered by 5 years ago

@Abhay108 how?

0
You declared this line of code as players, local Players = game:GetService("Players") You have to define what pledge is, then it should work. Abhay108 0 — 5y
0
bruh pledge is ltierally in a fricking function iiDkOffical 109 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

You never declared pledge to be a member players.

0
how iiDkOffical 109 — 5y

Answer this question