Why is this code not working?

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)

math.huge isn’t really a number, and even beyond a million the game starts to really glitch out. Try it with something more practical.

Try using Character:MoveTo(Vector3.new(0,math.huge, 0)) instead.

Thats the point, so that the player glitches and can’t do anything even with exploits.

maybe make a box for the players

I need the player to glitch so that exploiters are powerless

1 Like

That won’t stop exploiting even a little. If you want to stop exploits you need to kick them.

1 Like