This works only when i am in studio mode but it won't work in game mode.

Here is what i have:

game.Players.PlayerAdded:connect(function(player) 
    player.CharacterAdded:connect(function(char) 
        if char then
            local torso = char:FindFirstChild'Torso'
            local speed2 = Instance.new("ParticleEmitter", torso)
			local plr = game.Players.LocalPlayer
			local char = plr.Character
			local hum = char.Humanoid
			local color1 = Color3.new(0.255,0.0820,0.002)
			local color2 = Color3.new(0.255,0.0720,0.1)
			
hum.Running:connect(function(speed)
    if speed > 30 then
	
speed2.Texture = "http://www.roblox.com/asset/?id=281983189"
speed2.Size= NumberSequence.new(8)
speed2.LightEmission = 0.62
speed2.Rate = 200
speed2.Color = ColorSequence.new(color1,color2)
speed2.Lifetime = NumberRange.new(0,2)
speed2.EmissionDirection= 2
speed2.Transparency = NumberSequence.new(0.7)

    else
	
speed2.Texture = "http://www.roblox.com/asset/?id=281983189"
speed2.Size= NumberSequence.new(0)
speed2.LightEmission = 0
speed2.Color = ColorSequence.new(color1,color2)
speed2.Lifetime = NumberRange.new(1)
    end
end)
        end
    end)
end)

3 comments

0

Where is the script located? Is FilteringEnabled Enabled? Is this a LocalScript? Are there any errors? Can you provide any more information than what you have not given us?

0

yeah this script is a particle emitter on the torso but it only enables when your walkspeed is 30 or more and it is a script because it don't work as a localscript and it is located in workspace

0

and yes filteringenabled is enabled