That sounds like an interesting game idea! Here is a script in detail :)
Script: (Make sure the script is a ServerScript inside ServerScriptService)
01 | local plr = game:GetService( "Players" ) -- [ Defines the Player Service. |
03 | local function invis(char) -- [ Invisiblilty Function |
04 | for a,b in pairs (char:GetChildren()) do -- [ Gets all children of the player's character. |
05 | if b:IsA( "MeshPart" ) and b.Name ~ = 'Head' or b:IsA( "BasePart" ) and b.Name ~ = 'Head' then -- [ Checks if the part is a Part and not the head |
06 | b.Transparency = 1 -- [ Transparent |
07 | b.CanCollide = false -- [ No Collisiosns |
12 | plr.PlayerAdded:Connect( function (player) -- [ Runs when player is added |
13 | player.CharacterAdded:Connect(invis) -- [ Waits until that player's character is added |
Please be sure to mark this as the answer if this worked for you :)
Have a great day!
- DrShockz