How to make a model / object disappear when a player steps onto certain object / area

I am currently making a game and I wanted to add areas where you see a figure in distance but when you
reach a certain area / step onto a block the figure will vanish and won’t appear.

I did searched for solution but what I found only works for obbys and I am still learning how to script on roblox studio [ I still need to look up on internet for how to make a kill brick to give you idea on how much I still have to learn ]

So if anyone know how to do it then i would appreciate the help.

[ English isn’t my first language so I apologize for any grammar mistakes ]

3 Likes

You can use Reigon3 or you can make invisible hitbox detections and use .Touched to fire an event that despawns the models

Or use ontouch targetting a part from workspace

Workspace.DissapearingPart.CanCollide = false
Workspace.DissapearingPart.Transparency = 1

I’m not good at scripting so if this doesn’t work, I understand and I apologise.

You can do something like this

game.workspace.Area.Touched:Connect(function()
    DisappearingPart.Transparency = 1
end)

Edit: I had a typo so If you copied and pasted try again

2 Likes

Yeah do that, seems similar to what I was saying but an exact code. Thanks andrew! :smiley:

2 Likes

It does detect the event but the error appears : Workspace.Script2:attempt to index nit with " Transparency"

1 Like

I am away from my computer right now so I was not able to test it, but will be able to in 45 mins. Also make sure you put an end)

Alright I will also check if one of the scripts or somethink else is causing this

If that doesn’t work, just play my uncopylocked game of basic scripting. It changes all the parts in one script. It’s really useful imo.
Script Testing - Roblox
Here’s AlvinBlox’s video how to script

1 Like

This works for me Screen Shot 2021-01-14 at 12.30.44 PM
and I had 2 parts in workspace one named Disappearing part and Part

1 Like

Script works but I will need to change up a bit the model but it works!

Thank you mate and everyone else for help!
Want me to put your name in my game description?

Sure I’d love to see the game I helped even just a little bit :smile:

It’s just a maze game but it’s kinda the prequel to a greater project that I am working on but it will take me quite a bit to finish it [ Motivation mainly has been a problem ] but yea once I finish the current game I will put you in game description.

Again thanks for help

Look up " Old Maze " in near future or simply click my roblox name and you may see the game published

1 Like