I need the script to get the player's name then find the name in the Workspace and destroy a script inside the character.
✓ ANSWER ACCEPTED
How do you make a Text Button destroy something in a specific 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.
