Ad
Log in to vote
1

Hi How Do I Make A Brick Change It Color Once To Green And Back When Touched Only Once?

Asked by 1 year ago
Edited 1 year ago

How do i make a brick change its color when I touch it to any color I want then for about 1 second it changes back to its original color Only Once Not All the time

1 answer

Log in to vote
0
Answered by
Xapelize 2602 Moderation Voter Community Moderator
1 year ago
Edited 1 year ago
partbeforecolor = script.Parent.Color3
debounce = false

script.Parent.Touched:Connect(function()
    if debounce == false then -- cooldown for spam
    debounce = true
    script.Parent.BrickColor = BrickColor:Green()
    wait(1)
    script.Parent.Color3 = Color3.new(partbeforecolor)
    debounce = false
    end
end) 
0
so i only need to but this as a local script or a just a normal script? kidsteve923 139 — 1y
0
any Xapelize 2602 — 1y
0
local script only u see like minecraft ender chest but script is minecraft chest only Xapelize 2602 — 1y
Ad

Answer this question