Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make a part have a face?

Asked by 4 years ago

I want to make a game like speeding wall. For those who know the game you know that the wall has faces that can change when wall is angry and I am trying to do the same thing. I repeat a wall( a part ) not a player or an npc, a Part a block that you can insert not a player

0
you can just put a decal on the wall then add a randomizer script Humanitoria 2 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
--Put this script on a part not a model.
local WaitTime = 5 --Every # seconds part changes face and color
local FaceTextures = {"rbxassetid://1166775287", "rbxassetid://584931223"} --Add more faces if you want. --Choosing the random color.
local FaceDecal = Instance.new("Decal") --Creates the decal on the front of part.
FaceDecal.Parent = script.Parent --Setting parent of the decal.
while wait(WaitTime) do --While loop.
    local RandomFace = FaceTextures[math.random(1, #FaceTextures)] --Choosing the random face.
    local RandomColor = Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255))
    FaceDecal.Texture = RandomFace --Setting the random face.
    script.Parent.Color = RandomColor --Setting the random color.
end
Ad

Answer this question