local startPart = workspace:WaitForChild("StartPart")
startPart.Touched:Connect(function(hit)
print("Tocuhed 1")
local character = hit.Parent
local player = game.Players:GetPlayerFromCharacter(character)
if player then
print("Touched 2")
local startGameEvent = game.ReplicatedStorage:WaitForChild("RemoteEvents"):WaitForChild("StartGame")
startGameEvent:FireClient(player)
end
end)
startGameEvent.OnClientEvent:Connect(function()
if gameStarted then print("no") return end
gameStarted = true
revealSafeZone()
print("Game started from server!")
local centerTile = gridFolder:FindFirstChild("Tile_" .. centerX .. "_" .. centerY)
local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
if centerTile and hrp then
hrp.CFrame = centerTile.CFrame + Vector3.new(0, 6, 0)
end
end)```