Cant make a part resize only one way

BaseParts have a Resize function that allows you to resize in a specific direction, using a face of the part.

I dont think that would work cuz the blaster should spawn near the player after using the tool
also i kinda tried it i think and the beam just goes to minecraft

local Tool = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local debounce = false
local TweenService = game:GetService("TweenService")



Tool.Activated:Connect(function()
	if debounce ~= true then
		debounce = true
	  local Blaster = ReplicatedStorage:WaitForChild("Blaster"):Clone()
		Blaster.Parent = workspace
		Blaster:SetPrimaryPartCFrame(Tool.Parent.HumanoidRootPart.CFrame * CFrame.new(20,0,10))
		TweenService:Create(Blaster.Beamer,TweenInfo.new(1),{Size = Blaster.Beamer.Size + Vector3.new(200,0,0)}):Play()
		
		
		TweenService:Create(Blaster.Jaws,TweenInfo.new(1),{CFrame = Blaster.Jaws.CFrame * CFrame.Angles(-80,0,0)}):Play()
		TweenService:Create(Blaster.Beamer,TweenInfo.new(1),{Transparency = 0}):Play()
		TweenService:Create(Blaster.Beamer,TweenInfo.new(1),{Size = Blaster.Beamer.Size + Vector3.new(200,0,0),Position = Blaster.Beamer.Position + Vector3.new(114,0,0)}):Play()
		
		
	end
end)

Is there any way to tween it or something like that?

No, just call the function in a renderstep event to increase the size linearly over time.

can i use a repeat loop? Would it do?

I used a repeat loop,it kinda works but how do i make the beam not go backwards?
(like its coming from the blaster)

local Tool = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local debounce = false
local TweenService = game:GetService("TweenService")



Tool.Activated:Connect(function()
	if debounce ~= true then
		debounce = true
		local i = 0
	  local Blaster = ReplicatedStorage:WaitForChild("Blaster"):Clone()
		Blaster.Parent = workspace
		Blaster:SetPrimaryPartCFrame(Tool.Parent.HumanoidRootPart.CFrame * CFrame.new(20,0,10))
		TweenService:Create(Blaster.Beamer,TweenInfo.new(1),{Size = Blaster.Beamer.Size + Vector3.new(200,0,0)}):Play()
		
		
		TweenService:Create(Blaster.Jaws,TweenInfo.new(1),{CFrame = Blaster.Jaws.CFrame * CFrame.Angles(-80,0,0)}):Play()
		TweenService:Create(Blaster.Beamer,TweenInfo.new(1),{Transparency = 0}):Play()
		task.wait(0.3)
		repeat
			task.wait(0.005)
			i += 1
			Blaster.Beamer:Resize(Enum.NormalId.Right,3) 
		until i == 50
	    task.wait(1)
		debounce = false
		
	end
end)

It kinda uh,still goes two sides if i set the deltaAmount to 1

change the cframe and size and it’ll work

what i really mean is tween cframe and size

how though

Character limit bruh

game:GetService("TweenService"):Create(Blaster.Beamer, TweenInfo.new(1), {Size = Blaster.Beamer.Size + Vector3.new(200,0,0), CFrame = Blaster.Jaws.CFrame * CFrame.new(-Blaster.Beamer.Size/2, 0, 0)}):Play()

try this

image

rn is it supposed to shoot up?

also show the code you currently have right at the moment.


It should shoot out in that direction

local Tool = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local debounce = false
local TweenService = game:GetService("TweenService")



Tool.Activated:Connect(function()
	if debounce ~= true then
		debounce = true
		local i = 0
	  local Blaster = ReplicatedStorage:WaitForChild("Blaster"):Clone()
		Blaster.Parent = workspace
		Blaster:SetPrimaryPartCFrame(Tool.Parent.HumanoidRootPart.CFrame * CFrame.new(20,0,10))
		TweenService:Create(Blaster.Beamer,TweenInfo.new(1),{Size = Blaster.Beamer.Size + Vector3.new(200,0,0)}):Play()
		
		
		TweenService:Create(Blaster.Jaws,TweenInfo.new(1),{CFrame = Blaster.Jaws.CFrame * CFrame.Angles(-80,0,0)}):Play()
		TweenService:Create(Blaster.Beamer,TweenInfo.new(1),{Transparency = 0}):Play()
		task.wait(0.3)
		game:GetService("TweenService"):Create(Blaster.Beamer, TweenInfo.new(1), {Size = Blaster.Beamer.Size + Vector3.new(200,0,0), CFrame = Blaster.Jaws.CFrame * CFrame.new(-Blaster.Beamer.Size/2, 0, 0)}):Play()
	    task.wait(1)
		debounce = false
		
	end
end)

try this

local Tool = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local debounce = false
local TweenService = game:GetService("TweenService")



Tool.Activated:Connect(function()
	if debounce ~= true then
		debounce = true
		local i = 0
	  local Blaster = ReplicatedStorage:WaitForChild("Blaster"):Clone()
		Blaster.Parent = workspace
		Blaster:SetPrimaryPartCFrame(Tool.Parent.HumanoidRootPart.CFrame * CFrame.new(20,0,10))
		TweenService:Create(Blaster.Beamer,TweenInfo.new(1),{Size = Blaster.Beamer.Size + Vector3.new(200,0,0)}):Play()
		
		
		TweenService:Create(Blaster.Jaws,TweenInfo.new(1),{CFrame = Blaster.Jaws.CFrame * CFrame.Angles(-80,0,0)}):Play()
		TweenService:Create(Blaster.Beamer,TweenInfo.new(1),{Transparency = 0}):Play()
		task.wait(0.3)
		game:GetService("TweenService"):Create(Blaster.Beamer, TweenInfo.new(1), {Size = Blaster.Beamer.Size + Vector3.new(200,0,0), CFrame = Blaster.Jaws.CFrame * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0) * CFrame.new(-Blaster.Beamer.Size, 0, 0)}):Play()
	    task.wait(1)
		debounce = false
		
	end
end)

If you’re increasing the size on the X axis, the CFrame should also move Part.CFrame.LookVector * (Size.X / 2) as well to balance it out. Could probably be tweened like you want

1 Like

cant check rn if it works but im gonna assume it works