Workspace.VIP.VIPDoorScript:7: attempt to index global 'Players' (a nil value)
Thats what it says in the output.
01 | VIP = game.Workspace.VIP |
02 |
03 | TShirt = game.Workspace.TShirt |
04 | ID = TShirt.Graphic |
05 |
06 | function onTouched(hit) |
07 | if Players.TShirt.ID = = "http://www.roblox.com/The-Games-VIP-T-shirt-item?id=154826128" then |
08 | VIP.Transparency = 1 |
09 | VIP.CanCollide = false |
10 | wait( 2 ) |
11 | VIP.Transparency = 0 |
12 | VIP.CanCollide = true |
13 | else |
14 | if Players.TShirt.ID ~ = "http://www.roblox.com/The-Games-VIP-T-shirt-item?id=154826128" then |
15 | game.Workspace.Players:GetPlayers( "Humanoid" ) |
I don't see whats the problem? Why?
You haven't defined what 'Players' is.
1 | local Players = game.Players:GetPlayerFromCharacter(hit.Parent) |
Put that just under the start of the function.