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

What would be the best way to remove all morphs and tools in the same script?

I can not seem to find a script that removes morphs with out resetting your Player. Is there a way to remove both tools and morphs at the same time?

1 comment

0

This is a request, you don't want to learn anything but want an answer. You've made NO attempt. You were LOOKING for one, an couldn't find one so you REQUESTED, which is a NO.

1 answer

Well, a morph inside a player is called "CharacterMesh". If you want to remove all of those, as well as tools, you'll have to use a generic loop. I set the script below to do the following to a player named "brooksdart". You can of course change the target to another individual, or multiple players, with a background knowledge of Lua.

for i,v in pairs(game.Players.brooksdart.Character:GetChildren()) do
	if v:IsA("Tool") or v:IsA("CharacterMesh") then
		v:Destroy()
	end
end

for i,v in pairs(game.Players.brooksdart.Backpack:GetChildren()) do
	if v:IsA("Tool") then
		v:Destroy()
	end
end

2 comments

0

This is a request... why'd you answer

2

Eh, I felt like helping

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