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

How do you make a button??? (not the Gui)

I need help (sorry for the nooby question) How can i make a button the makes a block appear using transparency and cancolide?

3 answers

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.

2 comments

1

Thank you!!

0

You are welcome, please accept my answer and upvote it.

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

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