Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

this script works just fine on studios but it wont work on the Published game PLZ help?

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

3 comments

0

Could It BE because I have Lots Of Scripts In the Same GUI, Do i Have to Put them Into 1?

0

Is it a local script, or a script? You can't identify "player" in a normal script.

0

its a Local script

2 answers

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.