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

Works in Studio, but not in real game. Help?

Asked by 8 years ago

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)
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? M39a9am3R 3210 — 8y
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 robloxy0123 30 — 8y
0
and yes filteringenabled is enabled robloxy0123 30 — 8y

Answer this question