Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago

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

0
Could It BE because I have Lots Of Scripts In the Same GUI, Do i Have to Put them Into 1? FilthyMonsterPlays 8 — 6y
0
Is it a local script, or a script? You can't identify "player" in a normal script. spartanlord456 19 — 6y
0
its a Local script FilthyMonsterPlays 8 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

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.

Ad
Log in to vote
0
Answered by 6 years ago

:connect() is deprecated and only works in studio. You should do :Connect().

0
Nope. Both of them are normal and should work both in studio and in a server. LeadRDRK 437 — 6y
0
then what explains that THIS http://wiki.roblox.com/index.php?title=RBXScriptSignal#connect_2 is crossed out? hiimgoodpack 2009 — 6y

Answer this question