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

when a StringValue is "None" will be changed to "GomuGomuNoMi" but doesn't work,problem?

Im making a script that when a StringValue is "None" will be changed to "GomuGomuNoMi" but doesn't work, you know what is the problem?

button = script.Parent

function onTouch(part)
	local player = game.Players:GetPlayerFromCharacter(part.Parent)
	if player ~= nil then 
	   if player.stats.Race.Value == "None" then
		player.stats.Race.Value = "GomuGomuNoMi"
	end
end
end

button.Touched:connect(onTouch)

thanks

1 comment

0

I tried it and works fine, make sure It's in a 'Script' and not a 'Local Script', make sure the values are actually going into the player, make sure the value is 'None, 'and try debugging methods - ie. (print('Test1')). They'll work extremely well.

1 answer

"I tried it and works fine, make sure It's in a 'Script' and not a 'Local Script', make sure the values are actually going into the player, make sure the value is 'None, 'and try debugging methods - ie. (print('Test1')). They'll work extremely well."

By : xEiffel

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