Don't worry, I fixed it my self
It's cause the game is R15 only and I tried using Torso instead of UpperTorso lol
Its because you're trying to access the character of Game.Players. Game.Players is not a player but something that has all the players inside of it. If you want to get someones char then you gotta be more specific and have a username after it.
01 | players = game.Players |
02 | character = game.Players.Character |
03 |
04 | script.Parent.Touched:connect( function (hit) |
05 | for i, v in pairs (game.Players:GetPlayers()) do |
06 | inGame = v:FindFirstChild( "InGame" ) |
07 | if inGame then |
08 | if inGame.Value = = false then |
09 | if v.leaderstats.Points.Value > = 500 then |
10 | v.leaderstats.Points.Value = v.leaderstats.Points.Value - 500 |
11 |
12 | -- I'm guessing this is what you're trying to do. |
13 | v.Character.Torso.Transparency = 1 |
14 | end |
15 | end |
16 | end |
17 | end |
18 | end ) |
01 | players = game.Players |
02 | character = game.Players.LocalPlayer.Character |
03 |
04 | script.Parent.Touched:connect( function (hit) |
05 | for i, v in pairs (game.Players:GetPlayers()) do |
06 | inGame = v:FindFirstChild( "InGame" ) |
07 | if inGame then |
08 | if inGame.Value = = false then |
09 | if v.leaderstats.Points.Value > = 500 then |
10 | v.leaderstats.Points.Value = v.leaderstats.Points.Value - 500 |
11 | game.players.character.Torso.Transparency = 1 |
12 | end |
13 | end |
14 | end |
15 | end |
16 | end ) |
I dont use the "for" command that way but i know what is wrong you're trying to access "character" in players
(also make sure its r6 your current problem isnt that but it will help)
1 | local Character = game.Players.LocalPlayer.Character:wait() |