hello, i have a LOCAL script where i weld ice blocks to the character when they die but the welds just dont work at all, the prints suggest its active and working but the parts just fall through the floor
ive narrowed it down the the BreakJointsOnDeath but i want this on
ive tried handling on the server but it both didnt work and is undesirable
never mind i just broke the joints manually but if there is a better more optimal solution please let me know
server code
local rs = game:GetService("ReplicatedStorage")
local event = rs.Remotes:FindFirstChild("DeathVisuals")
local otherevent = rs.Remotes:FindFirstChild("DamageVisuals")
--if types isnt a table then itll explode lol
-- nvm added failsafe im so good at coding
return function(hum:Humanoid, damage:number, types:any)
--not important
if hum.Health <= 0 then --important stuff here
for _,v in hum.Parent:GetDescendants() do
if v:IsA("Motor6D") then
v:Destroy()
end
end
event:FireAllClients(hum, hum.Parent, types)
end
end
–client code
for _,v in hum.Parent:GetChildren() do
if v.Name == "HumanoidRootPart" then continue end
if v:IsA("BasePart") then
local ice = Instance.new("Part", character)
ice.Name = "ice"
ice.BrickColor = BrickColor.new("Pastel Blue")
ice.Transparency = 0.2
ice.Reflectance = 0.25
ice.Size = Vector3.new(v.Size.X + 0.1, v.Size.Y + 0.1, v.Size.Z + 0.1)
--ice.Anchored = true
--ice.CanCollide = false
task.wait()
local weld = Instance.new("WeldConstraint")
weld.Parent = ice
weld.Part1 = ice
weld.Part0 = v
weld.Enabled = true
task.wait()
ice.Position = v.Position
ice.Orientation = v.Orientation
--print(weld.Parent,weld.Part1, weld.Part0, weld.Enabled, weld.Active)
local d = 1
local f = .005 --Set this to a lower number for a better slide effect.
local e = 1
local fw = 100 --Set this to a higher number for a better slide effect.
local ew = 1
local Properties = PhysicalProperties.new(d, f, e, fw, ew)
ice.CustomPhysicalProperties = Properties
end