Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I move a part welded to another part?

I have made a glider that is welded to the character's head. The script runs, the glider is on the face of the player but I want it to be about 6 studs high. When I make the glider move up with script, it moves the whole player 6 studs high so I wanted the player to fall from a height and after a few seconds the glider spawns over the head causing it to be over the player's head but it still goes directly in the player's head

game.Players.PlayerAdded:Connect(function(plr)
	repeat wait()until plr.Character
	repeat wait()until plr.Character.Parent == workspace.FlightModel
	repeat wait()until plr.Character.Parent == workspace
	print("Exited")
	for _, descendant in pairs(game.ServerStorage:GetDescendants())do
		if descendant:IsA("Model") and descendant.Name == "DefaultGlider" then
			print("GliderFound")
			if descendant.Handle.Purchased.Value == true and 	descendant.Handle.Equipped.Value == true then
				print("GliderAvailable")
				local GliderClone = descendant:Clone()
				for name, child in pairs(GliderClone:GetChildren())do
					child.Anchored = true
					print("CloneAnchored")
					GliderClone.Parent = workspace
					GliderClone:MoveTo(plr.Character.Head.Position)
				
					local weld = Instance.new("Weld")
					weld.Parent = GliderClone.Handle
					weld.Part0 = GliderClone.Handle
					weld.Part1 = plr.Character.Head
					for name, child in pairs(GliderClone:GetChildren())do
						child.Anchored = false
					end
					print("GliderVisible")
				end
			end
		end 
	end
end)

1 answer

It seems u have a couple of options, either maintaining the weld and do a a tween or loop for example to change the weld's C0, or delete the weld, and make it so that the hat stays still for a second by anchoring it for example, and then move it to the position u want it to move close to the character's head with a BodyMover like BodyPosition and then weld it again

1 comment

0

It still has the same outcome

This discussion is preserved as it was. New answers, comments, and votes are closed.