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

Why won't the value of an IntValue change?

Asked by 4 years ago

Ok, I need some help, first of all, heres the script:

script.Parent.MouseButton1Click:Connect(function()

    script.Parent.Parent.PLO.Text = game.Workspace.Values.One.Value
    script.Parent.Parent.PLT.Text = game.Workspace.Values.Two.Value
    script.Parent.Parent.PLR.Text = game.Workspace.Values.Three.Value

    local number1 = script.Parent.Parent.PLO.Text
    local number2 = script.Parent.Parent.PLT.Text
    local number3 = script.Parent.Parent.PLR.Text

    local num = number1+number2+number3
    print(num)

    script.Parent.Parent.ValuePL.Value = num

    script.Parent.Text = "Wait 5"
    wait(1)
    script.Parent.Text = "Wait 4"
    wait(1)

    script.Parent.Parent.COO.Text = game.Workspace.Values.One.Value
    script.Parent.Parent.COT.Text = game.Workspace.Values.Two.Value
    script.Parent.Parent.COR.Text = game.Workspace.Values.Three.Value

    script.Parent.Text = "Wait 3"
    wait(1)
    script.Parent.Text = "Wait 2"
    wait(1)
    script.Parent.Text = "Wait 1"
    wait(1)
    script.Parent.Text = "Roll"
    wait(1)




end)

so the line where it says

local number1 = script.Parent.Parent.PLO.Text
    local number2 = script.Parent.Parent.PLT.Text
    local number3 = script.Parent.Parent.PLR.Text

    local num = number1+number2+number3
    print(num)

    script.Parent.Parent.ValuePL.Value = num

it will print num, but it wont change the value of ValuePL, please help!

0
16-37 is not what i'm working on right now. Spiyder1 81 — 4y
0
Is the script a local script or a regular script? FriendlyLolli123 37 — 4y
0
regular Spiyder1 81 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

Okay dude heres your problem

your using

 local num = number1+number2+number3

when it should be

 local num = number1 = number1 + number2 = number2 +number3

Try to get some help or read the wiki next time no work to be done tbh ;/

0
that completely disables the script :/ Spiyder1 81 — 4y
0
I find it ironic that that desables the script and you say: "Try to get some help or read the wiki next time no work to before you tell someone else to "get some help with scripting" this is ironic tbh. Spiyder1 81 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

Fixed it myself

script.Parent.MouseButton1Click:Connect(function()

    script.Parent.Parent.PLO.Text = game.Workspace.Values.One.Value
    script.Parent.Parent.PLT.Text = game.Workspace.Values.Two.Value
    script.Parent.Parent.PLR.Text = game.Workspace.Values.Three.Value

    local number1 = script.Parent.Parent.PLO.Text
    local number2 = script.Parent.Parent.PLT.Text
    local number3 = script.Parent.Parent.PLR.Text

    script.Parent.Parent.Value.Text = number1+number2+number3

    script.Parent.Text = "Wait 5"
    wait(1)
    script.Parent.Text = "Wait 4"
    wait(1)

    script.Parent.Parent.COO.Text = game.Workspace.Values.One.Value
    script.Parent.Parent.COT.Text = game.Workspace.Values.Two.Value
    script.Parent.Parent.COR.Text = game.Workspace.Values.Three.Value

    script.Parent.Text = "Wait 3"
    wait(1)
    script.Parent.Text = "Wait 2"
    wait(1)
    script.Parent.Text = "Wait 1"
    wait(1)
    script.Parent.Text = "Roll"
    wait(1)




end)

Answer this question