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

Can't get this script to use two values? (Solved)

Asked by
NexeusX 137
9 years ago

Basically i'm trying to get 'Two' values in this script, anyway you can see my note where i can't get the script to work, this only a fragment of the real script any help on what i use with it???

Value1 = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Coin
Value2 = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Gem


function onClick()
     if Rig1.Value >= 10 then
        Rig1.Value = CraftFunc[1].Value - 10

         if Rig2.Value = CraftFunc[1].Value - 10 then  --This is the problem i can't figure out how to fix...
            Rig2.Value = CraftFunc[1].Value - 10

end
end

script.Parent.MouseButton1Click:connect(onClick)
0
Why is the first if within a if statement, try making them both seperate. rexbit 707 — 9y
0
Ive already tryed that... NexeusX 137 — 9y
0
What is CraftFunc[1] ? Chronomad 180 — 9y
0
It was a table for my full script NexeusX 137 — 9y

1 answer

Log in to vote
1
Answered by
NexeusX 137
9 years ago

I found out what was wrong, i simply used the 'and' in the script and combined them now it works fine! Thanks for trying to help anyway.

Ad

Answer this question