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

How do I make a script that changes the decal of a block when I walk?

Hi! I'm new to making games and I'm trying to make a pet and I have some decals I want to put on the block for when I move in game. It's supposed to have one decal when idle, and change when walking/running. I don't if this is possible cause I'm just dumb lol and new to this.

1 comment

0

This is not a script request site.

1 answer

✓ Accepted answer
part = script.Parent
activated = false

part.Touched:connect(function(hit)
	if not activated then
		local Hum = hit.Parent:findFirstChild("Humanoid")
		if Hum ~= nil then
			activated = true
			script.Parent.Decal.Texture = 0 
		end
	 end
	activated = false
end)

remove the "0" and add the ID of the Decal.

"Script.parent.Decal.Texture" change "Decal" to the name of Your Decal.

1 comment

0

oh, you meant when the "pet" walks..

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