I’m trying to make a system that if you have enough ‘Chili’, you can turn muscular (suggesting that the body parts will change). But I wanted to test only the left foot, to not waste time. But I instead got the error in the title.
local morph = require(game.ReplicatedStorage.MorphScript)
script.Parent.OnServerEvent:Connect(function(plr)
local char = plr.Character
plr:WaitForChild("leaderstats").Chili.Value += 1
while wait() do
if plr:WaitForChild("leaderstats").Chili.Value >= 100 then
char.LeftFoot.MeshId = morph.leftfoot.MeshId
end
end
end)
Is there a workaround that (is no too hard) can change the MeshId?
Please read documentation before making a post for help.
Note that the MeshId property currently cannot be changed by scripts as the collision model of the mesh cannot be recomputed during runtime. Developers should not rely on this behavior as it may change in the future.
Those looking for a custom mesh object that can be updated during runtime should use a SpecialMesh.