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

Is there any way to use a Vector3 to resize and use a .Touched while being in another part?

I have tried pretty much everything but there must be some way. I have seen it before but I cant figure out how to keep it in another part. I have tried welding body positions and CFrames.

if key=='q' and almost then
			print('move')
			starting=false
			almost=false
			going=false
			local point=Instance.new('Part',game.Workspace)
			point.Anchored=true
			point.CanCollide=false
			point.Size=Vector3.new(2,2,2)
			local x=character.Torso.Position.X
			local y=character.Torso.Position.Y
			local z=character.Torso.Position.Z
			point.Shape='Ball'
			point.Transparency=.5
			point.BrickColor=BrickColor.new('Really black')
			character.Torso.CFrame=character.Torso.CFrame*CFrame.new(0,2,-20)
			point.Position=Vector3.new(x,y,z)
			for i=1,6 do
				local sphere=Instance.new('Part',game.Workspace)
				sphere.Shape='Ball'
				sphere.BrickColor=BrickColor.new('Really black')
				sphere.Transparency=.5
				sphere.CanCollide=false
				sphere.Size=Vector3.new(2,2,2)
				sphere.CFrame=point.CFrame
				sphere.Touched:connect(function()
					print('i')
				end)
				for a=1,10 do
					sphere.Size=sphere.Size+Vector3.new(1,1,1)
					sphere.Transparency=sphere.Transparency+.05
					wait(.025)
				end
				sphere:remove()
				wait(.5)
			end
			point:remove()
		end

This is just a small bit of it. This is the area in which the problem is.

3 comments

0

Point goes to where it should be but sphere just grows on top of point. My goal is to make sphere grow inside of point.

0

I dont really have to use any of those except that I have to be able to deal damage to a target that touched it as well as making it expand

0

How much lag would be created if I were to get the distance from the point to every character every 10th of a second?

1 answer

Im going to use magnitude to get the distance to the other characters every so often and when they get to close they take damage.

2 comments

0

love the fact that i can answer my own question xD

0

IT WORKED!

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