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

Why doesn't this script work?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

Nothing Appears in the Output it stops at the changed function. It doesnt fire what so ever.

maxxp = script.Parent.Parent.XP2
script.Parent.Changed:connect(function()
    maxxp.Value = maxxp.Value * 2
if script.Parent.Parent.Parent.Character ~= nil then
if  script.Parent.Parent.Parent.Character:FindFirstChild("Humanoid") then
        local humanoid = script.Parent.Parent.Parent.Character:FindFirstChild("Humanoid")
        humanoid.MaxHealth = 80+20*script.Parent.Value
end
end
end)
0
You should probably use a variable for `script.Parent.Parent` at the least and tab your code properly; it will look much, much cleaner. Please also edit your question to give it a more specific answer -- it should reflect just YOUR question, not every other one posted this site. BlueTaslem 18071 — 9y

Answer this question