I would like to know if it is possible to change a brick's size when a player is near it. I am trying to make a sci-fi-esque door and would like to know how to execute it.

local size = script.parent.Size
local position = script.Parent.Position
local workSpace = game:GetService("Workspace")
local players = game:GetService("Players")

local function open ()
while size > 0.1 do 
	size = size - 0.1	
	print("opening!")

	wait(0.1)
	if size == 0.1 then
		break
		end
	end
end

4 comments

0

Magnitude may do the trick for this case

0

I would probably use a fake part and Touched personally, that way its easier to resize as needed.

0

Yea, I'd do that too

0

You can use tweenservice