How would I work this function?
Pixel.Dead.Value.Enabled
is the bool value inside the pixel frame, when the function is called and the bool value is enabled, it should do the death animation..
It may be because I am doing this inside the function. Is it? If so what should I do? If not what is wrong?
3 | Pixel.Rotation = Pixel.Rotation + 50 |
The script
01 | local Pixel = script.Parent.Pixel |
04 | if Pixel.Dead.Value.Enabled = = true then |
07 | Pixel.Rotation = Pixel.Rotation + 50 |
10 | Pixel:TweenPosition(UDim 2. new(Pixel.Position.X.Scale,Pixel.Position.X.Offset,Pixel.Position.Y.Scale,Pixel.Position.Y.Offset- 500 ), "Out" , "Quad" ,. 5 ) |
12 | Pixel.Position = { 0.5 ,- 284 } , { 0.5 , 201 } |
13 | Pixel.Dead.Value.Enabled = false |
EDIT
01 | local Pixel = script.Parent.Pixel |
04 | if Pixel.Dead.Value.Enabled = = true then |
07 | Pixel.Rotation = Pixel.Rotation = i |
10 | Pixel:TweenPosition(UDim 2. new(Pixel.Position.X.Scale,Pixel.Position.X.Offset,Pixel.Position.Y.scale,Pixel.Position.Y.Offset- 500 ), "Out" , "Quad" ,. 5 ) |
13 | Pixel.Position = { 0.5 ,- 284 } , { 0.5 , 201 } |
15 | Pixel.Dead.Value.Enabled = false |