Hey guys, so basically I am trying to make it so when you enter the game you're a cat and when you move your hands, legs & head move with you. So, I tried to morph the Cat I made onto my Character and then I realized that there was a bug in there because my Character kept sinking into the surface below it. Last time I remember welding a big part onto my Character and it would do the same thing it would keep sinking into the ground which was quiet annoying. I have a video here to explain my situation better. Also I will paste the script I used to morph my cat onto the Character.
Here's the video: https://www.youtube.com/watch?v=o-4Dhi-FwgE&feature=youtu.be
Here's the script:
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
local children = char:GetChildren()
for q = 1, #children do
wait()
if char then
for i,v in pairs(char:GetChildren()) do
if v:IsA("BasePart") then
v.Transparency = 1
for _,s in pairs(v:GetChildren()) do
if s:IsA("Decal") then
s:remove()
end
end
elseif v:IsA("Hat") then
for _,t in pairs(v:GetChildren()) do
if t:IsA("Part") then
t.Transparency = 1
end
end
end
end
end
end
local prac = script.Cat
local cat = prac:clone()
local c = cat:GetChildren()
local mid = cat:WaitForChild("Mid")
for i = 1,#c do
if c[i]:IsA("Part") then
local weld = Instance.new("Weld")
weld.Part0 = mid
weld.Part1 = c[i]
local CJ = CFrame.new(mid.Position)
local C0 = mid.CFrame:inverse()*CJ
local C1 = c[i].CFrame:inverse()*CJ
weld.C0 = C0
weld.C1 = C1
weld.Parent = mid
end
local torso = char:WaitForChild("Torso")
local y = Instance.new("Weld")
y.Part0 = torso
y.Part1 = mid
y.C0 = CFrame.new(0,0,0)
y.Parent = torso
cat.Parent = workspace
end
local h = cat:GetChildren()
for i = 1, #h do
if h[i]:IsA("Part") then
h[i].Anchored = false
h[i].CanCollide = false
end
end
end)
end)
