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

Why won't the value of an IntValue change?

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!

3 comments

0

16-37 is not what i'm working on right now.

0

Is the script a local script or a regular script?

0

regular

2 answers

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 ;/

2 comments

0

that completely disables the script :/

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.

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)

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