Hi, I wrote this code. Basically I want to teleport the player to 0, math.huge, 0 and keep them there if they haven’t selected a fighter (character) yet.
Sadly, instead it does nothing, no error either.
Any ideas?
Thanks!
local Players = game:GetService("Players")
local ServerScriptService = game:GetService("ServerScriptService")
local RunService = game:GetService("RunService")
local Modules = ServerScriptService:WaitForChild("Modules")
local Utils = require(Modules.Utils)
RunService.Heartbeat:Connect(function()
for i,v in pairs(Players:GetPlayers()) do
local Data = Utils.GetData(v)
if not Data then end
if Data then
if Data.Character then
if Data.Character == "None" then
local Character = v.Character
Character.HumanoidRootPart.Position = Vector3.new(0, math.huge, 0)
end
end
end
end
end)