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

Model not moving to part's position. Why?

Ok so i pretty much want to move a model to a certain position in this case the players LeftLowerArm so i did this but it didn't work can someone explain why to me?

--Client
local uis = game:GetService("UserInputService")

uis.InputBegan:Connect(function(input,gameProcessedEvent)
    if input.UserInputType == Enum.UserInputType.Keyboard then
        if input.KeyCode == Enum.KeyCode.G and not gameProcessedEvent then
			script.Parent.Remotes.Equip:FireServer()	
		end 
    end
end)
--Server
script.Remotes.Equip.OnServerEvent:Connect(function(plr)
	local g = script.Gauntlet:WaitForChild("Thanos"):Clone()
	local c = plr.Character
	g.Parent = plr.Character
g.LeftLowerArm.PlayerWeld.Part1 = c.LeftLowerArm
		
		c.LeftHand.Transparency = 1
	g.LeftLowerArm:TranslateBy(c.LeftLowerArm.Position-g.LeftLowerArm:GetModelCFrame().p)
		for _, x in next, g:GetChildren() do
    local Match = c:FindFirstChild(x.Name)
    if (Match) then
        x:SetPrimaryPartCFrame(Match.CFrame)
    end
	end
end)

3 comments

0

I didnt clarify that these are two different scripts

0

take it step by step. see if the remote is firing to the server. after that, see if the gauntlet clone and character exist / gauntlet gets parented into the player. tell me when it stops working as expected

0

It is firing and it is in the player so i dont see what is wrong  

1 answer

I figured out a fix by just adding the welds after the model moves to the set position thank you for trying to help me!

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