Hello. I am really new at scripting and I need an script that instantly sets decal transparency to 1 after a player touches the part that the Decal is on. Any help?
COMMUNITY QUESTION
How to make Decal dissapear on part touch script?
1 answer
Hi! I made a script for you. You have to put the script inside the part, and the decal inside the same part. Script:
local Decal = script.Parent.Decal --You can change variable if you want
script.Parent.Touched:Connect(function(hit) --Function touched
if hit.Parent:FindFirstChild("Humanoid") then --Confirm if the object that touches the part is a player
Decal.Transparency = 1 --Transform decal transparency to 1 (invisible)
end
end)
If you have a question, let me know. I hope it helped you!
This discussion is preserved as it was. New answers, comments, and votes are closed.
