Replacing A Part with Another Part from Server Storage On Touch

Hey there!
I’m trying to make SCP-914, but I don’t know how to script the part inside the first room to detect the part that is touching it, and then to make another part from server storage appear in the other door, and destroy the first part.

2 Likes

Hey! I’m not really sure what are you trying to achieve. But if you would like to delete a part that touches another part and then move some another part from ServerStorage to the Workspace, then there should be pretty easy script solving this.

local ss = game:GetService("ServerStorage")
local spawningPart = --Put here the part that you want to be moved from ServerStorage to Workspace
local partToBeTouched = script.Parent

partToBeTouched.Touched:Connect(function(touchingPart)
    spawningPart:Clone().Parent = workspace --not really sure if you would like to clone the part or just move it
    touchingPart:Destroy()
end)
--PS: The part that is located in the ServerStorage has to be possitioned in the other door.

You can absolutly change the script how you need to, but this one should solve the thing that I think you are trying to achieve.

1 Like