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

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

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)

4 comments

0

Why is the first if within a if statement, try making them both seperate.

0

Ive already tryed that...

0

What is CraftFunc[1] ?

0

It was a table for my full script

1 answer

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.

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