this Script Work Just Fine In the Studio But it wont work On the Published game plz help ---this is a stats script By the Way
HC = script.Parent.Parent.CostHC -- this says How Much IT cost In the GUI button = script.Parent player = game.Players.LocalPlayer count = script.Parent.Parent.HealthC -- this says The Current Health U Have char = player.Character humanoid = char.Humanoid price = 75 Health = 100 max = false button.MouseButton1Click:connect(function() if humanoid.MaxHealth == 200 then max = true print("MaxHealth") end if player.leaderstats.Money.Value <= price then print("Not enough") elseif max == false then humanoid.MaxHealth = Health count.Text = count.Text + 1 Health = Health + 1 price = price + 25 HC.Text = price player.leaderstats.Money.Value = player.leaderstats.Money.Value - price wait(2) end end)
plz Help And, No the game is not Filtering Enabled
Scripting for awhile, this problem does not happen on rare occasions. However, this problem is due to the fact of not being aware of [tiny] mistakes that would be inconsistent in the play mode.
Here are two things you should try that might save you from this devastating event.
CHECKING IN-GAME - Errors can frequently be found not in the studio output but in the prompt in game. This can be accessed by pressing F9 in-game and there, observe several errors that aren't showing up in the studio output.
WRONG SCRIPT - Another problem can be caused by putting codes that aren't compatible with the type of script you're using. 'Localscripts','Scripts' to name a few, can differ.
And i assure you, at certain circumstances, this has nothing to do with miss spelled codes.
:connect()
is deprecated and only works in studio. You should do :Connect()
.