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

Anyone know how to fix this? -Racing script.

Asked by
TopDev 0
10 years ago

**I need it to be so if they haven't joined the race yet, it will add there name to a stringvalue, but if they are already in the race (with there name in a stringvalue) it simply does nothing or prints "In Race" the problem I am having is if one string value has text in it, even if it is not there name, it will not add there name to any of the string values. Please help? **

plr = game.Players.LocalPlayer.Name
script.Parent.MouseButton1Click:connect(function()
v = game.Workspace.Boards.Racing
if v.Two.Value == plr or v.One.Value == plr or v.Three.Value == plr then
    print'inrace'
elseif v.One.Value == "" then
    v.One.Value = plr
if v.Two.Value == plr or v.One.Value == plr or v.Three.Value == plr then
    print'inrace'
elseif v.Two.Value == "" then
    v.Two.Value = plr
    if  v.Two.Value == plr or v.One.Value == plr or v.Three.Value == plr then
        print'inrace'
         elseif v.Three.Value ==  "" then
        v.Three.Value = plr
    end
end
end
end)

1 answer

Log in to vote
0
Answered by 10 years ago
plr = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
v = game.Workspace.Boards.Racing
if v.Two.Value == plr.Name or v.One.Value == plr.Name or v.Three.Value == plr.Name then
    print'inrace'
elseif v.One.Value == "" then
    v.One.Value = plr.Name
if v.Two.Value == plr.Name or v.One.Value == plr.Name or v.Three.Value == plr.Name then
    print'inrace'
elseif v.Two.Value == "" then
    v.Two.Value = plr.Name
    if  v.Two.Value == plr.Name or v.One.Value == plr.Name or v.Three.Value == plr.Name then
        print'inrace'
         elseif v.Three.Value ==  "" then
        v.Three.Value = plr.Name
    end
end
end
end)
0
Didn't work, still having the same problem. If any of the string values have text in them, there name or not, the script won't add there name to the next string value (two), so if One's value isnt blank, and it's not the players name, then it's supposed to add it to the next value and so on. TopDev 0 — 10y
Ad

Answer this question