I need help (sorry for the nooby question) How can i make a button the makes a block appear using transparency and cancolide?
Well..... I am new to scripting so I don't know much, here what i know:-
function OnTouch(hit) -- "if" statement here, end of this statement is "then" CanCollide = -- set to true or false according to your request Transparency = -- set to true or false according to your request while do wait(5) CanCollide = -- set to true or false according to what you set in the past one Transparency = -- set to true or false according to what you set in the past one end end
I didn't make a whole working script, you will need to do some work in the script BECAUSE this is NOT a request site. You MUST give us a script to fix.
cd = script.Parent.ClickDetector sp = script.Parent on = false cd.MouseClick:connect(function() if on == false then on = true sp.Transparency = 1 sp.CanCollide = false elseif on == true then on = false sp.Transparency = 0 sp.CanCollide = true end end)
First of all, do u want it on touched or clicked I will assume clicked
Function OnMouseClick() script.Parent.Parent.Transperancy = 0.1 --choose any number you like script.Parent.Parent.CanCollide = false --true = can be touched false = no touch end script.Parent.MouseClick:connect(onMouseClick)
If u wanna know how to change it back, learn, this is all I'm going to give u Make sure script is inside click detector which is inside the part