I have a pretty big script here, and it took me forever to make it. Its 2 scripts split up by LocalScripts. I've tested it in Studio, and it works perfectly. Yet, when i play the actual game, it start making up problems. Here is the code now. Its 1 local script in StarterGui
01 | local UIS = game:GetService( 'UserInputService' ) |
02 | local pressing |
03 | local Energy = 90 |
04 | local player = game.Players.LocalPlayer |
05 | local character = player.Character |
06 | local PrettyColor = false |
07 | if not player or not character.Parent then |
08 | character = player.CharacterAdded:wait() |
09 | end |
10 | local torso = character.LowerTorso |
11 | local fire = Instance.new( "Fire" ) |
12 | fire.Parent = torso |
13 | fire.Enabled = false |
14 | fire.Heat = 6 |
15 | fire.Size = 6 |
Do you have filtering enabled turned on, if so... (I can't seem to comment - probably because of my low reputation so I can only say it here):
I've read about such situations before and have experienced it first hand and and I can likely tell you that this is as in studio, the local scripts act as normal scripts. So if you have filtering enabled, since local scripts can't communicate with the server, anything that changes the server should not work in the real game.
In your script:
1 | local fire = Instance.new( "Fire" ) |
2 | fire.Parent = torso |
3 | fire.Enabled = false |
4 | fire.Heat = 6 |
5 | fire.Size = 6 |
These things are the ones that has to be created by the server so that everyone see it, thus, it is most probably this that causes the local script to stop working. Note: Only if you have filtering enabled.
Solution: Personally, I would create a remote event to communicate with a server script to do it.