Works in Studio, but not in real game. Help?
This works only when i am in studio mode but it won't work in game mode.
Here is what i have:
01 | game.Players.PlayerAdded:connect( function (player) |
02 | player.CharacterAdded:connect( function (char) |
04 | local torso = char:FindFirstChild 'Torso' |
05 | local speed 2 = Instance.new( "ParticleEmitter" , torso) |
06 | local plr = game.Players.LocalPlayer |
07 | local char = plr.Character |
08 | local hum = char.Humanoid |
09 | local color 1 = Color 3. new( 0.255 , 0.0820 , 0.002 ) |
10 | local color 2 = Color 3. new( 0.255 , 0.0720 , 0.1 ) |
12 | hum.Running:connect( function (speed) |
16 | speed 2. Size = NumberSequence.new( 8 ) |
17 | speed 2. LightEmission = 0.62 |
19 | speed 2. Color = ColorSequence.new(color 1 ,color 2 ) |
20 | speed 2. Lifetime = NumberRange.new( 0 , 2 ) |
21 | speed 2. EmissionDirection = 2 |
22 | speed 2. Transparency = NumberSequence.new( 0.7 ) |
27 | speed 2. Size = NumberSequence.new( 0 ) |
28 | speed 2. LightEmission = 0 |
29 | speed 2. Color = ColorSequence.new(color 1 ,color 2 ) |
30 | speed 2. Lifetime = NumberRange.new( 1 ) |