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

String value changes again when I respawn after dying. How I can save previous value? Help please!

Asked by 9 years ago

Problem is inside a PlayerGui. When I click a button ("Tool3") a new value for a StringValue ("ToolSelected") inside a button named "Go" is given which is "Tool3" (Default Value is: "Tool1"). If I die the value again is "Tool1" instead of the previous one ("Tool3"). How i can save the previous Value so if I die when I respawn the Value is still "Tool3"

Here's the code for the button "Tool3"

ToolSelected = script.Parent.Parent.Parent.Parent.Go.ToolSelected

function click()
ToolSelected.Value =  "Tool3"
end

script.Parent.MouseButton1Down:connect(click)

1 answer

Log in to vote
0
Answered by 9 years ago

Forget It! Problem Solved :)

Ad

Answer this question