how to get particles on cash level ?
Asked by
7 years ago Edited 7 years ago
I'm trying to give players different colored particles when they reach a certain amount of Money.
i have the following Script working perfectly with no errors in studio, however it does nothing in server.
The hierarchy is as follows game.StarterPlayer.StarterCharcterScripts.Part.Script, ParticleEmitter
FE is OFF, and No error present themselves.
I am extremely new with no prior knowledge to scripting, learning from vids and editing for days until something works, an explanation of how i've gone wrong or a point to an alternative method would be most appreciated.
thanks in advance.
01 | local player = game.Players.LocalPlayer |
02 | local money = player.leaderstats.Money |
07 | if money.Value < 1000 then |
08 | script.Parent.CFrame = script.Parent.Parent.HumanoidRootPart.CFrame |
09 | script.Parent.ParticleEmitter.Color = ColorSequence.new(Color 3. new( 1 , 1 , 1 )) |
10 | elseif money.Value > 999 and money.Value < 2500 then |
11 | script.Parent.CFrame = script.Parent.Parent.HumanoidRootPart.CFrame |
12 | script.Parent.ParticleEmitter.Color = ColorSequence.new(Color 3. new( 0 , 0 , 1 )) |
13 | elseif money.Value > 2499 and money.Value < 5000 then |
14 | script.Parent.CFrame = script.Parent.Parent.HumanoidRootPart.CFrame |
15 | script.Parent.ParticleEmitter.Color = ColorSequence.new(Color 3. new( 1 , 0 , 1 )) |
16 | elseif money.Value > 4999 and money.Value < 10000 then |
17 | script.Parent.CFrame = script.Parent.Parent.HumanoidRootPart.CFrame |
18 | script.Parent.ParticleEmitter.Color = ColorSequence.new(Color 3. new( 0 , 1 , 0 )) |
19 | elseif money.Value > 9999 and money.Value < 25000 then |
20 | script.Parent.CFrame = script.Parent.Parent.HumanoidRootPart.CFrame |
21 | script.Parent.ParticleEmitter.Color = ColorSequence.new(Color 3. new( 0 , 1 , 1 )) |
22 | elseif money.Value > 24999 and money.Value < 75000 then |
23 | script.Parent.CFrame = script.Parent.Parent.HumanoidRootPart.CFrame |
24 | script.Parent.ParticleEmitter.Color = ColorSequence.new(Color 3. new( 1 , 0 , 0 )) |
25 | elseif money.Value > 74999 and money.Value < 500000 then |
26 | script.Parent.CFrame = script.Parent.Parent.HumanoidRootPart.CFrame |
27 | script.Parent.ParticleEmitter.Color = ColorSequence.new(Color 3. new( 0 , 0 , 0 )) |
28 | elseif money.Value > 499999 and money.Value < 1000000 then |
29 | script.Parent.CFrame = script.Parent.Parent.HumanoidRootPart.CFrame |
30 | script.Parent.ParticleEmitter.Color = ColorSequence.new(Color 3. new( 1 , 1 , 0 )) |