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

String Value Help? [UNSOLVED]

Asked by 9 years ago

I wanted to make a script, where it changes the value of a String Value for gamemodes, I have a script here:

function onClick()
    script.Parent.Parent.Parent.Tutorialformap1.gm.Value="training"
end
script.Parent.MouseButton1Up:connect(onClick)

No output, I check the String Value and it does not change help?

1
What is the hierachy on Objects in Explorer? Is this a LocalScript or a normal Script? adark 5487 — 9y
0
Local. antlerer 33 — 9y
0
Most likely there is something wrong with the path to the value because if you did switch to MouseButton1Down then the code should be working fine VariadicFunction 335 — 9y
0
I checked it, it still doesn't work :c antlerer 33 — 9y
View all comments (3 more)
0
Is there an error in the output? If not, why do you think it's not working? Have you tried adding `print`s to check if things are working? BlueTaslem 18071 — 9y
0
I will try add prints. antlerer 33 — 9y
0
Nope, it gets to the end but doesn't change it and no output. antlerer 33 — 9y

2 answers

Log in to vote
0
Answered by 9 years ago

MouseButton1Up is when the person lets go of the mouse, Try MouseButton1Down.

0
Still doesn't work antlerer 33 — 9y
Ad
Log in to vote
-1
Answered by 9 years ago

I found the problem.

Values do not support text, only numbers or true/false.

Try using the value name instead.

You can also try assigning gamemodes as different numbers.

Ex- TDM = 1; FFA = 2; etc.

0
How about StringValues? Discern 1007 — 9y
0
I tried number values aswell. antlerer 33 — 9y

Answer this question