i'm doing a game where you can use the CCTV cameras. I wanted to put this feature where if i switch to another camera it's gonna do a static effect and i was doing this by putting a variable that is gonna change depending in what camera i was using. However, it didn't work well. i tried to find a solution and i discovered that my if statements work on normal scripts but on local ones they don't. Can someone explain me this problem and how to solve it? Thank you.
1 | v = 1 |
2 |
3 | if v = = 1 then |
4 | print ( "bruh" ) |
5 | end |
That prints "Bruh" and doesn't do it's job.
I don't see anything that could do that so... Here. Make the right arrow key named "Right" and the left arrow key "Left" Make sure you use the caps.
1 | --In a local script inside the Right arrow key |
2 |
3 | local Static = (Run the static)() |
4 |
5 | script.Parent.MouseButton 1 Click:Connect( function () |
6 | Static() --I assume that the function "Static" Runs the static. |
7 | end ) |
1 | --In a local script inside the Left arrow key |
2 |
3 | local Static = (Run the static)() |
4 |
5 | script.Parent.MouseButton 1 Click:Connect( function () |
6 | Static() --I assume that the function "Static" Runs the static. |
7 | end ) |
Lol I really did it