local playerName = game.Players.LocalPlayer.Name game.Players.PlayerAdded:Connect(function() local rand = math.random(1,2,3,4) if game.Workspace.Signs["Sign"..rand].SurfaceGui.TextLabel.Text == "Empty House" then game.Workspace.Signs["Sign"..rand].SurfaceGui.TextLabel.Text = playerName.."'s House" elseif game.Workspace.Signs["Sign"..rand].SurfaceGui.TextLabel.Text ~= "Empty House" then repeat place = math.random(1,2,3,4) until game.Workspace.Signs["Sign"..rand].SurfaceGui.TextLabel.Text == "Empty House" if game.Workspace.Signs["Sign"..rand].SurfaceGui.TextLabel.Text == "Empty House" then game.Workspace.Signs["Sign"..rand].SurfaceGui.TextLabel.Text = playerName.."'s House" end end end)
This is a LocalScript that I made for house owning. So basicly if your first join this server It get's the name and do math.random for choosing a random house, and in the house sign, it will say "PlayerName's House" But it doesn't work.
I believe that this might be the problem.
local rand = math.random(1,2,3,4) repeat place = math.random(1,2,3,4)
math.random must two have to numbers and not more than that(If I'm not wrong). So this two codes should fix your problem. Just change the two codes above with this bottom one.
local rand = math.random(1,4) repeat place = math.random(1,4)
This way the script will pick the number from 1 to 4(Inclusive) Hopefully this helps you. :)