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

How do you make a Text Button destroy something in a specific character?

I need the script to get the player's name then find the name in the Workspace and destroy a script inside the character.

1 answer

✓ Accepted answer

(put this in a localscript)

button = script.Parent
target = game.Players.LocalPlayer.Character["PutNameOfObjectToDestroyHere"]
--the line above will look for your target in the player's character.
button.MouseButton1Click:connect(function()
	target:Destroy()
end)

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