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

How do I make a part, that is CanCollide = true, but I can still see through it if I move my camera?

To be specific, I have a script, where, a block is clone from ReplicatedStorage, to the position(CFrame) of "Torso". Torso is anchored before this. The problem is, I want to see myself in the brick, but since it's CanCollide = true, I can't. My camera stays zoomed in. If I make it CanCollide = false, I can zoom out freely, but then it's not collideable, which is not what I want. Here's my script:

local part = script.Parent
local db = false

function burn(hit)
	
	local p1 = hit.Parent:FindFirstChild("Left Arm")
	local p2 = hit.Parent:FindFirstChild("Right Arm")
	local p3 = hit.Parent:FindFirstChild("Left Leg")
	local p4 = hit.Parent:FindFirstChild("Right Leg")
	local p5 = hit.Parent:FindFirstChild("Torso")
	local p6 = hit.Parent:FindFirstChild("Head")
	local fire = Instance.new("Fire")
	local human = hit.Parent:FindFirstChild("Humanoid")
	local myArray = {p1, p2, p3, p4, p5, p6}
	
	if human then
		if not db then
			
			db = true
			
			part:Destroy()
			human.Parent.Shirt:Destroy()
			human.Parent.Pants:Destroy()
			for i,v in pairs(myArray) do
				v.BrickColor = BrickColor.Blue()
			        end
			wait(2)
			p5.Anchored = true
			local freeze = game.ReplicatedStorage.freeze:Clone()
			freeze.Parent = game.Workspace
			freeze.CFrame = p5.CFrame
			
			db = false
			    end
			end
		end
	
	
part.Touched:connect(burn)

Everything works, there's no errors. I just don't know how I would go about doing this. All help is appreciated!

1 answer

Parent it to the character instead

1 comment

0

Um. I added another variable, that GetsPlayerFromCharacter, and then I parented the "Freeze" part to chracter instead of game.Workspace. But nothing happens. Any ideas?

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