Trying to make part size to mouse

Ok, so basically I’m creating a magic fire system, and basically the size doesn’t update to the mouse. Which I need it to, basically.

User presses F
User can drag the fire, but it stays in the same like position for a few seconds before disapearing.


Video demo: ^
That’s what I want it to do.

SCRIPTS:
module:

local module = {}

local timeUse = 8

function module:AdvancedPyro(Mouse)
	local UID = game:GetService("UserInputService")
	local RunService =game:GetService("RunService")
	
	
	local sizing = UID:GetMouseLocation()
	local cloned = script.Part:Clone()
	cloned.Parent = game.Workspace
	
	game:GetService("RunService").RenderStepped:Connect(function()
		cloned.Size = Vector3.new(9.101, 0.101, 0.101)
		cloned.CFrame = CFrame.new(Mouse.Hit.p)
	end)
	
	wait(8)
	cloned:Destroy()
	
end

return module

client:

local player = game.Players.LocalPlayer
local UID = game:GetService("UserInputService")
local mouse = player:GetMouse()

local db = false

UID.InputBegan:Connect(function(key,IsTyping)
	if not IsTyping then
		if key.KeyCode == Enum.KeyCode.F then
			if db == false then
				db = true
				local module = require(game.ReplicatedStorage.AdvancedPyrokineses)
				module:AdvancedPyro(mouse)
				wait(8)
				db = false
			end
		end
	end
end)

Instead of:

cloned.CFrame = CFrame.new(Mouse.Hit.p)

Try:

cloned.CFrame = CFrame.new(Mouse.Hit)

Hit.p is a Vector3 value, whereas Hit is a CFrame value.

ReplicatedStorage.AdvancedPyrokineses:15: invalid argument #3 (CFrame expected, got Vector3)
image

Nope.

cloned.CFrame = Mouse.Hit

I meant like this, should’ve double checked before sending.

Works, but how would I make it like the effect show in the video? :slight_smile:

What else needs to be added for it to be like the video? I haven’t done any testing my end.

The effect for it, meaning that it slowly appears & disappears.

Are you using a fire instance?

Yes, I am indeed, which is located inside the part

Just modify the value of this property in small increments/decrements, increase to make fire appear, decrease to make fire disappear.

But it’s all in a part, meaning that it’ll go altogether.

That property just changes the size of the fire emitted. The smaller the number the smaller the fire and hence the larger the number the larger the fire.