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

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

Asked by 6 years ago

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

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. xEiffel 280 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

"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

Ad

Answer this question