i'm new to scripting and i need a script that will make a block disappear after i touched the block i put the script in. Please use simpler terms since im very new and i dont undertstand everything. Thanks
How to make a part disappear after someone touches diffrent block?
2 answers
Heya, let me tell you some simple steps here:
Steps
Insert 3 parts, and name those parts becomes 1, 2 and 3.
Insert an IntValue into the workspace. Also note, don't change the IntValue name.
How do we make these works
If you touched the part '1', then the value will become 1, and then make other parts become invisible.
If you touched the part '2', then the value will become 2, and then make other parts become invisible. And etc.
Script time!
Now it's script time, no more description here, let get right into the scripting time :P
Insert part '1', part '2' and part '3' this script:
script.Parent.Touched:connect(function(hit) -- this will give a event to server if you touched.
workspace.Value.Value = script.Parent.Name -- make the IntValue's value become the part's name, so that's why I tell you to change the part name lol
end)
Insert the IntValue a script:
while wait(.5) do -- update the script every 0.5 seconds.
if script.Parent.Value == 1 then -- if intvalue's value was 1
game.Workspace["1"].Transparency = 0 -- set those part transparency
game.Workspace["2"].Transparency = .5 -- if you want to make the part cleary invisible, set it to 1.
game.Workspace["3"].Transparency = .5
end
if script.Parent.Value == 2 then
game.Workspace["1"].Transparency = .5
game.Workspace["2"].Transparency = 0
game.Workspace["3"].Transparency = .5
end
if script.Parent.Value == 3 then
game.Workspace["1"].Transparency = .5
game.Workspace["2"].Transparency = .5
game.Workspace["3"].Transparency = 0
end
end
Ok, it's done. So anyways, comment below if you have a question, or PM me at ROBLOX. Thanks for seeing this answer! c:
Mark this as answer if that worked to you, I have some grammars problem, but it was 100% to work, if that doesn't work, also comment below too :D
Click this to the testing game!
So, I'm Jack_Roblox2008, cya tomorrow :)
the end (also note rip grammar teacher 2020 - 2020)
10 comments
Please mark this as answer ;-; please c:
Thanks it worked!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I DONT EVEN SPEAK ENGLISH IRL I LEARNT IT THROUGH VIDEO GAMES XDXD
DUDDE WHEN IT DISAPPEARS I CANT GO THROUGH IT PLEASE HELPPPP
Make the all part cancollide become TRUEEEE
or ill update my script
wtf does that MMMEEEANN
Inside the properties window there is a property called CanCollide Turn the property off.
do u have to make it that complicated for the newbie
Go to the properties, and there have a thing called CanCollide. Or you can use 'script.Parent.CanCollide = true' or 'script.Parent.CanCollide = false' to toggle on and off the part throughable or not.
Well, Jack's answer was right, but it's a little more complicated than I like. Here's how I would do it:
script.Parent.Touched:Connect(function()
game.workspace.Part2.Transparency = 1
end
A lot less code and much simpler.
1 comment
Nice, I tried to use while wait(.5) do to update the script every 0.5 seconds but I didn't think might work too :P Thanks for the answer! I've learned how to post a simpler answer XD
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Reply to your Private message: What do you want to make?