Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make a player into an object?

Asked by 7 years ago
Edited 3 years ago

I'm trying to make a game like titan fall but what script can help me make the player a object or mesh?

0
Mech? Mesh? User#18043 95 — 7y
0
MECH! Like a robot and stuff Noobap0 2 — 7y

2 answers

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

Deleting the player's parts sets the player to watch where his dead invisible body was forever.

To counteract that, use a generic loop and set every part invisible plus deleting hats.

player = --find a way to refer to the player, do not use LocalPlayer

for i, v in ipairs(player:GetChildren()) do
    if v:IsA("Part") or v:IsA("MeshPart") then -- R15 and R6 friendly
        v.Transparency = 1
    elseif v:IsA("Accesory") then -- rip hats
        v:Destroy()
    end
end

If you want to set the mech and stuff just weld it to the player's invisible body parts.

To weld, there's a wiki page but the primary properties of the weld required to attach the mech is

C0 -- the part to attach aka the mech.

Part0 -- same as C0 but gathering the part's CFrame aka mech's CFrame.

C1 -- the part to attach to aka the player's body part such as a torso.

Part1 -- same as C1 but gathering the part's CFrame aka torso's CFrame.

0
Would I be able to animate it after I connect the parts to the invisible parts Noobap0 2 — 5y
Ad
Log in to vote
-2
Answered by 7 years ago

I dont actually know, but try doing something like

Mech= --Directory to Mech

game.Players.LocalPlayer.Character = Mech

-- or try

Mech= --Directory to Mech

Mech.Parent = game.Players.LocalPlayer.Character 

Answer this question