How to make a Face Changer On Roblox Studio!

Опубликовано: 28 Октябрь 2024
на канале: StudioTutorialzYT
8,636
267

Hello everyone! I hope you all understood and enjoyed this video! If you have any suggestions or questions please comment down below and I'll try my best to answer it! Have a great day/night!

Baii! 💗

Script:

function getDecal()
decals = {}
for i,child in pairs(script.Parent:getChildren()) do
if child.className == "Decal" then
table.insert(decals, child)
end
end
if #decals ~= 0 then
return decals[math.random(1, #decals)]
end
return nil
end

function onTouch(hit)
if hit.Parent:findFirstChild("Humanoid") ~= nil then
local head = hit.Parent:findFirstChild("Head")
if head ~= nil then
local face = head:findFirstChild("face")
if face.Texture ~= getDecal().Texture then
face.Texture = getDecal().Texture
end
end
end
end

script.Parent.Touched:connect(onTouch)




---------- Decal I used: http://www.roblox.com/asset/?id=51921...

#RobloxStudioTutorials