Hello there, so i have a little issue that has been bugging me for a couple days now that id like some of your guys’s feedback on, so i have this tictactoe game board i have made for a game, its a tool that when you click places down a board you can play a special version of tictactoe which limits each player to 3 moves each before they have to move their oldest one and replace it with a new move, so it cannot tie, you can play this with other people, now in my own separate game where i made the board, it works fine, i can play it and it works fine, however when i move it to the main game, it breaks, it is the exact same thing, the code, the locations even the names, it is the exact same, we have no idea why it breaks,
the game has a loading system and a custom tool system but it doesn’t at all interfere with the scripts of the system and everything should work as intended however when its in the game, the aforementioned last move bugs out and it delays the move by a turn, so if lets say you had 3 placed and went to place another, it would bug out and be one turn late to each move, i have no idea why this happened and was hoping someone else has had a issue like this and had a solution, below are the scripts, thanks in advance.
Local script inside of a screen GUI, the local handler:
local TTTGameEvents = game.ReplicatedStorage.TicTacToeGameEvents
local TurnButtonLocation = script.Parent.Frame.AllTurnButtons
local Timer = 15
local EnemyTimer = 15
TTTGameEvents.OnClientEvent:Connect(function(Order, opnet, Callsign, RemoteEvent, CT, BoardName)
local GAME_ENDED = false
local OldestPlaced = {}
local NumOfPlaced = 0
local CurrentlyPlaceTable = {
one = "",
two = "",
three = "",
four = "",
five = "",
six = "",
seven = "",
eight = "",
nine = ""
}
local EnemyOldestPlaced = {}
local function CleanUP()
CurrentlyPlaceTable = {
one = "",
two = "",
three = "",
four = "",
five = "",
six = "",
seven = "",
eight = "",
nine = ""
}
EnemyOldestPlaced = {}
OldestPlaced = {}
for U, I in pairs(TurnButtonLocation:GetChildren()) do
if I:IsA("TextButton") then
I.Text = ""
I.TextStrokeTransparency = 1
end
end
for G, X in pairs(script.Parent.Frame.VictoryLines:GetChildren()) do
if X:IsA("Frame") then
X.Visible = false
end
end
NumOfPlaced = 0
GAME_ENDED = false
script.Parent.Enabled = false
script.Enabled = false
task.wait(0.1)
script.Enabled = true
end
local EnemyCallsign
if Order == "begingame" then
local CPlayer = game.Players.LocalPlayer
local EnemyP = game.Players:FindFirstChild(opnet)
CPlayer.PlayerGui.TicTacToeGUI.Enabled = true
if Callsign == "X" and GAME_ENDED == false then
script.Parent.Frame.TurnFrame.CurrentTurn.Text = "Your Turn (15)"
EnemyCallsign = "O"
else
script.Parent.Frame.TurnFrame.CurrentTurn.Text = "Their Turn (15)"
EnemyCallsign = "X"
end
coroutine.wrap(function()
if CT.Value == Callsign and GAME_ENDED == false or CT.Value == EnemyCallsign and GAME_ENDED == false then
EnemyTimer = 15
Timer = 15
while wait() do
if GAME_ENDED == true then
break
end
CT.Changed:Connect(function()
if GAME_ENDED == false then
EnemyTimer = 15
Timer = 15
end
end)
task.wait(1)
if CT.Value == Callsign and game.Workspace:FindFirstChild(BoardName) then
if Timer > 0 then
Timer = Timer - 1
end
script.Parent.Frame.TurnFrame.CurrentTurn.Text = "Your Turn (" .. Timer .. ")"
if Timer == 0 then
GAME_ENDED = true
script.Parent.LoserSound:Play()
script.Parent.Frame.TurnFrame.CurrentTurn.Text = "YOU RAN OUT OF TIME"
RemoteEvent:FireServer("TimeEndedCondition", Callsign, "Winner", false)
task.wait(5)
CleanUP()
break
end
elseif CT.Value == EnemyCallsign and game.Workspace:FindFirstChild(BoardName) then
if EnemyTimer > 0 then
EnemyTimer = EnemyTimer - 1
end
script.Parent.Frame.TurnFrame.CurrentTurn.Text = "Their Turn (" .. EnemyTimer .. ")"
if EnemyTimer == 0 then
GAME_ENDED = true
script.Parent.WinnerSound:Play()
script.Parent.Frame.TurnFrame.CurrentTurn.Text = "THEY RAN OUT OF TIME"
task.wait(5)
CleanUP()
break
end
end
end
end
end)()
for i, v in pairs(TurnButtonLocation:GetChildren()) do
if v:IsA("TextButton") then
v.Activated:Connect(function()
if CT.Value == Callsign and NumOfPlaced < 3 and CurrentlyPlaceTable[v.Name] == "" and GAME_ENDED == false and game.Workspace:FindFirstChild(BoardName) then
NumOfPlaced = NumOfPlaced + 1
table.insert(OldestPlaced, v.Name)
RemoteEvent:FireServer("ChangeValue", Callsign, CT.Parent.Parent.CurrentUsedSlots:FindFirstChild(v.Name), true)
task.wait(0.1)
script.Parent.Frame.TurnFrame.CurrentTurn.Text = "Their Turn (15)"
RemoteEvent:FireServer("Pass", Callsign)
print("not more then three, placing one of first 3")
v.Text = Callsign
if Callsign == "X" then
v.TextColor3 = Color3.new(1, 0, 0)
else
v.TextColor3 = Color3.new(0, 0, 255)
end
if NumOfPlaced == 3 then
for i, E in pairs(OldestPlaced) do
if i == 1 then
TurnButtonLocation:FindFirstChild(E).TextStrokeTransparency = 0
end
end
end
elseif CT.Value == Callsign and NumOfPlaced >= 3 and CurrentlyPlaceTable[v.Name] == "" and GAME_ENDED == false and game.Workspace:FindFirstChild(BoardName) then
script.Parent.Frame.TurnFrame.CurrentTurn.Text = "Their Turn (15)"
RemoteEvent:FireServer("Pass", Callsign)
print("done third move, enemy turn")
for i, E in pairs(OldestPlaced) do
print("checking oldest tab")
if i == 1 then
print("found oldest, changing oldest")
TurnButtonLocation:FindFirstChild(E).Text = ""
table.remove(OldestPlaced, 1)
TurnButtonLocation:FindFirstChild(E).TextStrokeTransparency = 1
RemoteEvent:FireServer("ChangeValue", Callsign, CT.Parent.Parent.CurrentUsedSlots:FindFirstChild(E), false)
end
end
table.insert(OldestPlaced, v.Name)
RemoteEvent:FireServer("ChangeValue", Callsign, CT.Parent.Parent.CurrentUsedSlots:FindFirstChild(v.Name), true)
if NumOfPlaced >= 3 then
print("editing text stroke transparency")
for i, E in pairs(OldestPlaced) do
if i == 1 then
TurnButtonLocation:FindFirstChild(E).TextStrokeTransparency = 0
end
end
end
v.Text = Callsign
if Callsign == "X" then
v.TextColor3 = Color3.new(1, 0, 0)
else
v.TextColor3 = Color3.new(0, 0, 255)
end
end
end)
end
end
CloseAndForfitButton.Activated:Connect(function()
if GAME_ENDED == false then
script.Parent.LoserSound:Play()
end
GAME_ENDED = true
script.Parent.Enabled = false
RemoteEvent:FireServer("Surrender", Callsign, EnemyP.Name, CPlayer.Name)
task.wait(5)
CleanUP()
end)
CT.Changed:Connect(function()
if CT.Value == Callsign and GAME_ENDED == false then
script.Parent.Frame.TurnFrame.CurrentTurn.Text = "Your Turn (15)"
end
if CT.Value == "X" or CT.Value == "O" then
script.Parent.MoveMade:Play()
end
if CT.Value ~= tostring(CPlayer.Name .. " Wins") and GAME_ENDED == false then
print("doing CT changes")
for i, v in pairs(CT.Parent.Parent.CurrentUsedSlots:GetChildren()) do
if v.Value ~= "" then
for P, O in pairs(CurrentlyPlaceTable) do
local CUS = CT.Parent.Parent.CurrentUsedSlots:FindFirstChild(P)
CurrentlyPlaceTable[P] = CUS.Value
print("updating locations of buttons?")
if O ~= Callsign and O ~= "" then
if not EnemyOldestPlaced[3] and not table.find(EnemyOldestPlaced, P) then
table.insert(EnemyOldestPlaced, P)
if EnemyOldestPlaced[3] then
TurnButtonLocation:FindFirstChild(EnemyOldestPlaced[1]).TextStrokeTransparency = 0
end
end
if EnemyOldestPlaced[3] and not table.find(EnemyOldestPlaced, P) then
TurnButtonLocation:FindFirstChild(EnemyOldestPlaced[1]).TextStrokeTransparency = 1
table.remove(EnemyOldestPlaced, 1)
table.insert(EnemyOldestPlaced, P)
TurnButtonLocation:FindFirstChild(EnemyOldestPlaced[1]).TextStrokeTransparency = 0
end
end
end
if v.Value == "X" then
local VTC = TurnButtonLocation:FindFirstChild(v.Name)
VTC.Text = "X"
VTC.TextColor3 = Color3.new(1, 0, 0)
end
if v.Value == "O" then
local VTC = TurnButtonLocation:FindFirstChild(v.Name)
VTC.Text = "O"
VTC.TextColor3 = Color3.new(0, 0, 255)
end
end
if v.Value == "" then
local VTC = TurnButtonLocation:FindFirstChild(v.Name)
VTC.Text = ""
end
end
end
if CT.Value == tostring(EnemyP.Name .. " Wins") then
for P, O in pairs(CurrentlyPlaceTable) do
local CUS = CT.Parent.Parent.CurrentUsedSlots:FindFirstChild(P)
CurrentlyPlaceTable[P] = CUS.Value
if O ~= Callsign and O ~= "" then
if not EnemyOldestPlaced[3] and not table.find(EnemyOldestPlaced, P) then
table.insert(EnemyOldestPlaced, P)
if EnemyOldestPlaced[3] then
TurnButtonLocation:FindFirstChild(EnemyOldestPlaced[1]).TextStrokeTransparency = 0
end
end
if EnemyOldestPlaced[3] and not table.find(EnemyOldestPlaced, P) then
TurnButtonLocation:FindFirstChild(EnemyOldestPlaced[1]).TextStrokeTransparency = 1
table.remove(EnemyOldestPlaced, 1)
table.insert(EnemyOldestPlaced, P)
TurnButtonLocation:FindFirstChild(EnemyOldestPlaced[1]).TextStrokeTransparency = 0
end
end
end
end
task.wait(0.1)
if CT.Value == tostring(EnemyP.Name .. " Surrenders") and GAME_ENDED == false then --- surrender event
GAME_ENDED = true
script.Parent.Frame.TurnFrame.CurrentTurn.Text = CT.Value .. ", You Win!"
script.Parent.WinnerSound:Play()
task.wait(5)
CleanUP()
end
if CT.Value == tostring(CPlayer.Name .. " Wins") or CT.Value == tostring(EnemyP.Name .. " Wins") then
GAME_ENDED = true
for P, O in pairs(CurrentlyPlaceTable) do
local CUS = CT.Parent.Parent.CurrentUsedSlots:FindFirstChild(P)
CurrentlyPlaceTable[P] = CUS.Value
end
if CT.Value == tostring(CPlayer.Name .. " Wins") then
script.Parent.Frame.TurnFrame.CurrentTurn.Text = "YOU WIN!"
script.Parent.WinnerSound:Play()
local CUITC = script.Parent.Frame.VictoryLines.onetwothree
if CurrentlyPlaceTable.one == Callsign and CurrentlyPlaceTable.two == Callsign and CurrentlyPlaceTable.three == Callsign then
CUITC = script.Parent.Frame.VictoryLines.onetwothree
CUITC.Visible = true
elseif CurrentlyPlaceTable.four == Callsign and CurrentlyPlaceTable.five == Callsign and CurrentlyPlaceTable.six == Callsign then
CUITC = script.Parent.Frame.VictoryLines.fourfivesix
CUITC.Visible = true
elseif CurrentlyPlaceTable.seven == Callsign and CurrentlyPlaceTable.eight == Callsign and CurrentlyPlaceTable.nine == Callsign then
CUITC = script.Parent.Frame.VictoryLines.seveneightnine
CUITC.Visible = true
elseif CurrentlyPlaceTable.one == Callsign and CurrentlyPlaceTable.four == Callsign and CurrentlyPlaceTable.seven == Callsign then
CUITC = script.Parent.Frame.VictoryLines.onefourseven
CUITC.Visible = true
elseif CurrentlyPlaceTable.two == Callsign and CurrentlyPlaceTable.five == Callsign and CurrentlyPlaceTable.eight == Callsign then
CUITC = script.Parent.Frame.VictoryLines.twofiveeight
CUITC.Visible = true
elseif CurrentlyPlaceTable.three == Callsign and CurrentlyPlaceTable.six == Callsign and CurrentlyPlaceTable.nine == Callsign then
CUITC = script.Parent.Frame.VictoryLines.threesixnine
CUITC.Visible = true
elseif CurrentlyPlaceTable.one == Callsign and CurrentlyPlaceTable.five == Callsign and CurrentlyPlaceTable.nine == Callsign then
CUITC = script.Parent.Frame.VictoryLines.onefivenine
CUITC.Visible = true
elseif CurrentlyPlaceTable.three == Callsign and CurrentlyPlaceTable.five == Callsign and CurrentlyPlaceTable.seven == Callsign then
CUITC = script.Parent.Frame.VictoryLines.threefiveseven
CUITC.Visible = true
end
if Callsign == "X" then
CUITC.BackgroundColor3 = Color3.new(1, 0, 0)
else
CUITC.BackgroundColor3 = Color3.new(0, 0, 255)
end
task.wait(5)
CleanUP()
end
if CT.Value == tostring(EnemyP.Name .. " Wins") then
script.Parent.Frame.TurnFrame.CurrentTurn.Text = "YOU LOSE..."
script.Parent.LoserSound:Play()
local CallsignToCheck
if Callsign == "X" then
CallsignToCheck = "O"
else
CallsignToCheck = "X"
end
local CUITC = script.Parent.Frame.VictoryLines.onetwothree
if CurrentlyPlaceTable.one == CallsignToCheck and CurrentlyPlaceTable.two == CallsignToCheck and CurrentlyPlaceTable.three == CallsignToCheck then
CUITC = script.Parent.Frame.VictoryLines.onetwothree
CUITC.Visible = true
elseif CurrentlyPlaceTable.four == CallsignToCheck and CurrentlyPlaceTable.five == CallsignToCheck and CurrentlyPlaceTable.six == CallsignToCheck then
CUITC = script.Parent.Frame.VictoryLines.fourfivesix
CUITC.Visible = true
elseif CurrentlyPlaceTable.seven == CallsignToCheck and CurrentlyPlaceTable.eight == CallsignToCheck and CurrentlyPlaceTable.nine == CallsignToCheck then
CUITC = script.Parent.Frame.VictoryLines.seveneightnine
CUITC.Visible = true
elseif CurrentlyPlaceTable.one == CallsignToCheck and CurrentlyPlaceTable.four == CallsignToCheck and CurrentlyPlaceTable.seven == CallsignToCheck then
CUITC = script.Parent.Frame.VictoryLines.onefourseven
CUITC.Visible = true
elseif CurrentlyPlaceTable.two == CallsignToCheck and CurrentlyPlaceTable.five == CallsignToCheck and CurrentlyPlaceTable.eight == CallsignToCheck then
CUITC = script.Parent.Frame.VictoryLines.twofiveeight
CUITC.Visible = true
elseif CurrentlyPlaceTable.three == CallsignToCheck and CurrentlyPlaceTable.six == CallsignToCheck and CurrentlyPlaceTable.nine == CallsignToCheck then
CUITC = script.Parent.Frame.VictoryLines.threesixnine
CUITC.Visible = true
elseif CurrentlyPlaceTable.one == CallsignToCheck and CurrentlyPlaceTable.five == CallsignToCheck and CurrentlyPlaceTable.nine == CallsignToCheck then
CUITC = script.Parent.Frame.VictoryLines.onefivenine
CUITC.Visible = true
elseif CurrentlyPlaceTable.three == CallsignToCheck and CurrentlyPlaceTable.five == CallsignToCheck and CurrentlyPlaceTable.seven == CallsignToCheck then
CUITC = script.Parent.Frame.VictoryLines.threefiveseven
CUITC.Visible = true
end
if CallsignToCheck == "X" then
CUITC.BackgroundColor3 = Color3.new(1, 0, 0)
else
CUITC.BackgroundColor3 = Color3.new(0, 0, 255)
end
task.wait(5)
CleanUP()
end
end
end)
game.Workspace.DescendantRemoving:Connect(function(child) ------ CHANGE TO BOARD PLACEMENT IN MAIN GAME
if child.Name == BoardName and GAME_ENDED == false then
GAME_ENDED = true
script.Parent.Frame.TurnFrame.CurrentTurn.Text = "BOARD DESTROYED, DRAW"
script.Parent.DrawSound:Play()
task.wait(5)
CleanUP()
end
end)
end
end)
Server script inside of a group in workspace, the server handler:
local TTTGameEventsRemote = game.ReplicatedStorage.TicTacToeGameEvents
local TTTLetters = game.ReplicatedStorage.TTTLetters
local GroundBoard = script.Parent
local BoolBoard = script.Parent.Parent.CurrentUsedSlots
local PlayLocations = script.Parent.Parent.PlayLocations
local VictoryLinesPhysical = script.Parent.Parent.VictoryLines
local GAME_FINISHED = false
local Timer = 15
local CurrentlyPlaceTable = {
one = "",
two = "",
three = "",
four = "",
five = "",
six = "",
seven = "",
eight = "",
nine = ""
}
local function CleanUp()
script.Parent.Parent:Destroy()
end
script.Parent.BoardPlacementSound:Play()
PlayerRemote.OnServerEvent:Connect(function(Plr, Order)
if Order == "add" then
if script.PlrOne.Value == "" then
script.PlrOne.Value = Plr.Name
elseif script.PlrOne.Value ~= Plr.Name and script.PlrTwo.Value == "" then
script.PlrTwo.Value = Plr.Name
end
end
end)
local RemoteEvent = script.Parent["L-LComBindEvent"]
script.PlrTwo.Changed:Connect(function()
if script.PlrOne.Value ~= "" and script.PlrTwo.Value ~= "" then
script.Parent.JoinPrompt.Enabled = false
local PlrOneC = game.Players:FindFirstChild(script.PlrOne.Value)
local PlrTwoC = game.Players:FindFirstChild(script.PlrTwo.Value)
TTTGameEventsRemote:FireClient(PlrOneC, "begingame", PlrTwoC.Name, "X", script.Parent["L-LComBindEvent"], script.Parent.CurrentTurn, script.Parent.Parent.Name)
TTTGameEventsRemote:FireClient(PlrTwoC, "begingame", PlrOneC.Name, "O", script.Parent["L-LComBindEvent"], script.Parent.CurrentTurn, script.Parent.Parent.Name)
end
end)
game.Workspace.DescendantRemoving:Connect(function(Decendent)
if Decendent.Name == script.PlrOne.Value and script.PlrTwo.Value ~= "" then
script.Parent.CurrentTurn.Value = tostring(script.PlrTwo.Value .. " Wins")
GAME_FINISHED = true
task.wait(5)
CleanUp()
elseif Decendent.Name == script.PlrTwo.Value and script.PlrTwo.Value ~= "" then
script.Parent.CurrentTurn.Value = tostring(script.PlrOne.Value .. " Wins")
GAME_FINISHED = true
task.wait(5)
CleanUp()
end
end)
RemoteEvent.OnServerEvent:Connect(function(Pler, Ord, Callsign, Extra, ExtraTwo)
local PlrOne = game.Players:FindFirstChild(script.PlrOne.Value)
local PlrTwo = game.Players:FindFirstChild(script.PlrTwo.Value)
if Ord == "Pass" then
if Pler.Name == PlrOne.Name then ---- X
script.Parent.CurrentTurn.Value = "O"
elseif Pler.Name == PlrTwo.Name then ----- O
script.Parent.CurrentTurn.Value = "X"
end
end
if Ord == "ChangeValue" then
if ExtraTwo == true then
Extra.Value = Callsign
else
Extra.Value = ""
end
end
if Ord == "TimeEndedCondition" then
task.wait(5)
GAME_FINISHED = true
CleanUp()
end
if Ord == "Surrender" then
--Winner = Extra
--Loser = ExtraTwo
script.Parent.CurrentTurn.Value = ExtraTwo .. " Surrenders"
task.wait(5)
GAME_FINISHED = true
CleanUp()
end
for i, v in pairs(BoolBoard:GetChildren()) do
if v.Value ~= "" and not PlayLocations.OnBoardLetters:FindFirstChild(v.Name) then
local HB = PlayLocations:FindFirstChild(v.Name)
local LetterToUse = TTTLetters:FindFirstChild("Letter" .. Callsign):Clone()
local NewWeld = Instance.new("WeldConstraint")
NewWeld.Parent = LetterToUse
NewWeld.Part0 = LetterToUse
NewWeld.Part1 = HB
LetterToUse.Position = HB.Position
LetterToUse.Parent = PlayLocations.OnBoardLetters
LetterToUse.Name = v.Name
LetterToUse.Anchored = false
if Callsign == "X" then
LetterToUse.Color = Color3.new(1, 0, 0)
elseif Callsign == "O" then
LetterToUse.Color = Color3.new(0, 0, 1)
end
end
if v.Value == "" and PlayLocations.OnBoardLetters:FindFirstChild(v.Name) then
PlayLocations.OnBoardLetters:FindFirstChild(v.Name):Destroy()
end
end
for P, O in pairs(CurrentlyPlaceTable) do
if script.Parent then
local CUS = script.Parent.Parent.CurrentUsedSlots:FindFirstChild(P)
CurrentlyPlaceTable[P] = CUS.Value
end
end
if CurrentlyPlaceTable.one == Callsign and CurrentlyPlaceTable.two == Callsign and CurrentlyPlaceTable.three == Callsign or CurrentlyPlaceTable.four == Callsign and CurrentlyPlaceTable.five == Callsign and CurrentlyPlaceTable.six == Callsign or CurrentlyPlaceTable.seven == Callsign and CurrentlyPlaceTable.eight == Callsign and CurrentlyPlaceTable.nine == Callsign then
script.Parent.CurrentTurn.Value = tostring(Pler.Name .. " Wins")
if CurrentlyPlaceTable.one == Callsign and CurrentlyPlaceTable.two == Callsign and CurrentlyPlaceTable.three == Callsign then
VictoryLinesPhysical.onetwothree.Transparency = 0
elseif CurrentlyPlaceTable.four == Callsign and CurrentlyPlaceTable.five == Callsign and CurrentlyPlaceTable.six == Callsign then
VictoryLinesPhysical.fourfivesix.Transparency = 0
elseif CurrentlyPlaceTable.seven == Callsign and CurrentlyPlaceTable.eight == Callsign and CurrentlyPlaceTable.nine == Callsign then
VictoryLinesPhysical.seveneightnine.Transparency = 0
end
for J, H in pairs(VictoryLinesPhysical:GetChildren()) do
if Callsign == "X" then
H.Color = Color3.new(1, 0, 0)
elseif Callsign == "O" then
H.Color = Color3.new(0, 0, 1)
end
end
GAME_FINISHED = true
task.wait(5)
CleanUp()
elseif CurrentlyPlaceTable.one == Callsign and CurrentlyPlaceTable.five == Callsign and CurrentlyPlaceTable.nine == Callsign or CurrentlyPlaceTable.three == Callsign and CurrentlyPlaceTable.five == Callsign and CurrentlyPlaceTable.seven == Callsign then
script.Parent.CurrentTurn.Value = tostring(Pler.Name .. " Wins")
if CurrentlyPlaceTable.one == Callsign and CurrentlyPlaceTable.five == Callsign and CurrentlyPlaceTable.nine == Callsign then
VictoryLinesPhysical.onefivenine.Transparency = 0
elseif CurrentlyPlaceTable.three == Callsign and CurrentlyPlaceTable.five == Callsign and CurrentlyPlaceTable.seven == Callsign then
VictoryLinesPhysical.threefiveseven.Transparency = 0
end
for J, H in pairs(VictoryLinesPhysical:GetChildren()) do
if Callsign == "X" then
H.Color = Color3.new(1, 0, 0)
elseif Callsign == "O" then
H.Color = Color3.new(0, 0, 1)
end
end
GAME_FINISHED = true
task.wait(5)
CleanUp()
elseif CurrentlyPlaceTable.two == Callsign and CurrentlyPlaceTable.five == Callsign and CurrentlyPlaceTable.eight == Callsign or CurrentlyPlaceTable.one == Callsign and CurrentlyPlaceTable.four == Callsign and CurrentlyPlaceTable.seven == Callsign or CurrentlyPlaceTable.three == Callsign and CurrentlyPlaceTable.six == Callsign and CurrentlyPlaceTable.nine == Callsign then
script.Parent.CurrentTurn.Value = tostring(Pler.Name .. " Wins")
if CurrentlyPlaceTable.one == Callsign and CurrentlyPlaceTable.four == Callsign and CurrentlyPlaceTable.seven == Callsign then
VictoryLinesPhysical.onefourseven.Transparency = 0
elseif CurrentlyPlaceTable.two == Callsign and CurrentlyPlaceTable.five == Callsign and CurrentlyPlaceTable.eight == Callsign then
VictoryLinesPhysical.twofiveeight.Transparency = 0
elseif CurrentlyPlaceTable.three == Callsign and CurrentlyPlaceTable.six == Callsign and CurrentlyPlaceTable.nine == Callsign then
VictoryLinesPhysical.threesixnine.Transparency = 0
end
for J, H in pairs(VictoryLinesPhysical:GetChildren()) do
if Callsign == "X" then
H.Color = Color3.new(1, 0, 0)
elseif Callsign == "O" then
H.Color = Color3.new(0, 0, 1)
end
end
GAME_FINISHED = true
task.wait(5)
CleanUp()
end
end)
game.Workspace.ChildRemoved:Connect(function(ChildGone) -- hehe
if "TicTacToeBoard_Owned_by_" .. ChildGone.Name == script.Parent.Parent.Name then
if script.PlrTwo.Value == "" then
script.Parent.JoinPrompt.Enabled = false
script.Parent.Parent:Destroy()
end
end
end)
PS: there is a join one that simply adds the player to the “seat” to play, it has no connection to these two so there is no reason it would cause any issues, thanks for any help in advance.