so uh, the title explains itself, i want to make a 2d topdown shooter, so i want to make that the player can't cheat, btw, client only.
thats my code for now
local plr = game.Players.LocalPlayer
local char = plr.Character
local Players = game.Players
for i, player in ipairs(Players:GetPlayers()) do
if player.Name ~= plr.name then
character = player.Character
player.Character.Head.Transparency = 1
player.Character["Left Arm"].Transparency = 1
player.Character["Right Arm"].Transparency = 1
player.Character["Left Leg"].Transparency = 1
player.Character["Right Leg"].Transparency = 1
player.Character.Torso.Transparency = 1
end
end
local dot = char.Head.CFrame.LookVector:Dot(character.Head.Position)
if (dot > 0.5) then
character.Head.Transparency = 0
character["Left Arm"].Transparency = 0
character["Right Arm"].Transparency = 0
character["Left Leg"].Transparency = 0
character["Right Leg"].Transparency = 0
character.Torso.Transparency = 0
else
character.Head.Transparency = 1
character["Left Arm"].Transparency = 1
character["Right Arm"].Transparency = 1
character["Left Leg"].Transparency = 1
character["Right Leg"].Transparency = 1
character.Torso.Transparency = 1
end
i've put this script into starter character scripts, thats just a bunch of copy and paste, i hope that someone helps me

1 comment
works perfectly