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

How do I make my morph into a morph gui gui?

what I mean is that this script is for my morph on a touch part and I was wondering how do I make it work on a gui like if someone press my button gui called Remove

Heres the script:

function onTouch(part) 
local human = part.Parent:findFirstChild("Humanoid") 
if human ~= nil then 
part.Parent:findFirstChild("Head").Transparency = 0
part.Parent:findFirstChild("Torso").Transparency = 1
part.Parent:findFirstChild("Left Arm").Transparency = 1
part.Parent:findFirstChild("Right Arm").Transparency = 1
part.Parent:findFirstChild("Left Leg").Transparency = 1
part.Parent:findFirstChild("Right Leg").Transparency = 1
end 
end 
script.Parent.Touched:connect(onTouch)

1 comment

0

Remote events

1 answer

Make sure this is a LocalScript and inside the Button.

local Player = game.Players:WaitForChild(game.Players.LocalPlayer.Name)
local Character = Player.Character

local Button = script.Parent

function HIDE()
	for _, v in pairs(Character:GetChildren()) do 
		if v.Name ~= "Head" and v:IsA('BasePart') then -- makes all of the character's parts transparent except for the head
			v.Transparency = 1
		end
	end
end

Button.MouseButton1Click:connect(HIDE)

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