#trying 2 make the player have a hingeconstraint in rootpart when they join the game

19 messages · Page 1 of 1 (latest)

brittle ice
#

im having a problem w the highlighted part. im trying to parent the hinge 2 the rootpart. tytyttytyty

vast bluff
#

can you parent an instance to a humanoid?

#

if so just make the parent humanoid with a cframe that places it in the middle

brittle ice
#

i appreciate the help mb i was meant 2 say i figured it out but ty

vast bluff
#

no

#

can u paste it as a codebox

#

like you type

#
ur code
#

i see the issue

brittle ice
#

game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) local torso = char:WaitForChild("HumanoidRootPart") --You can change this to another body part wait(3) local targethinge = Instance.new("HingeConstraint", torso) targethinge.Name = "targethinge" local targetatt = Instance.new("Attachment", torso) targetatt.Name = "targetatt" targethinge.Attachment0 = targetatt targethinge.Attachment1 = workspace.testyprim.targetattachment2 targethinge.Enabled = false end) end)

#

it works

#

but like

vast bluff
#

get rid of torso

#

put

#

targetatt.Parent = torso

brittle ice
#

it does what i want it 2 but im trying 2 do a loop where the hinge enables and then disables

#

yk

vast bluff
#

on a different line

#

i gtg help later