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

How do I make when someone steps on a brick it changes decal?

Asked by 7 years ago
Edited 7 years ago

How do I make when someone steps on a brick it changes the face decal then after a short ammount of time it changes back? I really want to animate someone talking when you go up to them. Please reply if you know >.< Thank you for helping! :D

1 answer

Log in to vote
0
Answered by 7 years ago

An example: Insert a script in the Part which will be touched. Put inside:

local NewDecal = 32578004 -- Put the Image ID of the Decal you want to appear when the brick is touched.
local Decal = game.Workspace.DecalPart.Decal -- DecalPart is an example. Put the location of your part.
function onTouch(hit)
    Decal.Texture = "http://www.roblox.com/asset/?id="..NewDecal -- It changes the Decal's texture to the variable we determined.
end
script.Parent.Touched:connect(onTouch)
0
thank you! XUnicorn_SprinklesX -8 — 7y
0
plse approve my answer SulaymanArafat 230 — 7y
0
"rbxassetid://" works aswell. Its shorter than http://www.roblox.com/asset/?id= YTRaulByte 389 — 7y
0
true but who minds... xD SulaymanArafat 230 — 7y
Ad

Answer this question