garrysmod-issues
garrysmod-issues copied to clipboard
RemoveInternalConstraint invalid on ClientSideRagdolls
Details
64 bit chromium & none branch
Running RemoveInternalConstraint on a clientside ragdoll throws an error
attempt to call method 'RemoveInternalConstraint' (a nil value)
Steps to reproduce
util.PrecacheModel("models/player/breen.mdl")
concommand.Add("csrag", function(ply)
if SERVER then return end
local trace = LocalPlayer():GetEyeTrace()
local ragdoll = ClientsideRagdoll("models/player/breen.mdl")
ragdoll:SetNoDraw(false)
ragdoll:DrawShadow(true)
ragdoll:SetPos(trace.HitPos)
ragdoll:RemoveInternalConstraint(5)
end)
Because ClientsideRagdoll
doesn't return an entity which can use Entity:RemoveInternalConstraint
function. Clientside entities have fewer capabilities than those created by the server, in short this is not a bug.
The function is serverside only.
Duplicate of https://github.com/Facepunch/garrysmod-requests/issues/2328