So I am trying to make it so that there is an area where cheaters are teleported to but for some reason it is not teleporting me. This is a local script that is in the StarterPlayerScripts folder. Also, there is a bool value in the player to see if it is true or false.
while true do
wait()
local player = script.Parent.Parent
local character = player.Character
if player.IsBanned == true then
character.Head.CFrame = CFrame.new(9.605, 9.232, 124.862)
end
end

4 comments
Did you try teleport the HumanoidRootPart instead? Also I usually teleport a player to a part and not a specific location. If you are gonna teleport the player by part, add 5 studs so player doesn't get stuck in part.
Why is it a local script??? Make it a server script.
if player.IsBanned.Value == true then
it has to be a local script