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

String Value Help? [UNSOLVED]

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?

7 comments

1

What is the hierachy on Objects in Explorer? Is this a LocalScript or a normal Script?

0

Local.

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

0

I checked it, it still doesn't work :c

0

Is there an error in the output? If not, why do you think it's not working? Have you tried adding prints to check if things are working?

0

I will try add prints.

0

Nope, it gets to the end but doesn't change it and no output.

2 answers

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

1 comment

0

Still doesn't work

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.

2 comments

0

How about StringValues?

0

I tried number values aswell.

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