Hi, so I have been trying to burn people when they touch the part spawned by :Clone() but when I add Touched event to the cloned part the person who touches it doesn't burn. I have been trying many ways like adding functions in functions but it still does not work.
Here's my code:
local toclone = script.Parent:WaitForChild("Handle")
local RE = script.Parent:WaitForChild("Throw")
local DS = game:GetService("Debris")
local function newClone(plr)
local newclone = toclone:Clone()
newclone.Parent = workspace
newclone.Name = "Molotov Cocktail"
newclone.CanCollide = true
newclone.Position = plr.Character.Head.Position + (plr.Character.Head.CFrame.lookVector * 4) + Vector3.new(0,3,-2)
newclone.Velocity = plr.Character.Head.CFrame.lookVector * 40
local addFire = Instance.new("Fire")
addFire.Parent = newclone
addFire.Enabled = true
addFire.Heat = 9
addFire.Size = 5
DS:AddItem(newclone, 5)
end
RE.OnServerEvent:Connect(newClone)

5 comments
I know I am adding it for visuals to make it look realistic but I don't know how I can manually add it to the player, is there any possible ways to do that?
yes the player has char which exists out of parts just parent it to one of those
but when I try to make it touch the newclone variable is not defined as the newClone function has closed
What do you mean ?, you can add an .Touched in there for the molotov and check if its hits a player and then add the fire to that player ?
Thanks, I think my fire script is not working and I will rework on it