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

how do i fix this the player is to trans from but he keep on dying how do i fix?

btw no errors

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player)
	
	
	for _,put in pairs(game.Workspace.Dummy:GetChildren()) do
		
	
		if put:IsA("BasePart") then
			
			local ip = put:Clone()
			
	
				local weld =  Instance.new("Weld",ip)
				weld.Part0 = ip
			ip.Parent = player.Character
			weld.Part1 = player.Character:FindFirstChild(put.Name)
		
			
			for _,i in pairs(player.Character:GetChildren()) do
		
		if i:IsA("BasePart") then
			i.Transparency = 1
		
			
		end
			end
			
			
			
			
		end
	end
	

	
	
end)

2 comments

0

can you rephrase... everything

0

Erm from the sound of it you are doubling the humanoid root part, idk if thats whats doing it, but either way. ^

1 answer

✓ Accepted answer

Server Script

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Remote = ReplicatedStorage:WaitForChild("RemoteEvent")

Remote.OnServerEvent:Connect(function(player)
	local Character = workspace:WaitForChild(player.Name)
	for _, put in pairs(workspace.Dummy:GetChildren()) do
		if put:IsA("BasePart") then
			local ip = put:Clone()
			ip.Parent = Character
			
			local weld = Instance.new("Weld", ip)
			weld.Part0 = ip
			weld.Part1 = Character:WaitForChild(put.Name)
			
			for _, i in pairs(Character:GetChildren()) do
				if i:IsA("BasePart") then
					i.Transparency = 1
				end
			end
		end
	end
end)

Try it like this and see if it doesn't work, I made it so that the game waits for some of the instances, in case they loaded too early.

2 comments

0

that generally isnt a good way for getting the character, as the player objects have a character property, also meshparts, parts, and union operations are subclasses of BasePart

0

i still die

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