Cloned part only existing server-side, StreamingEnabled is not the problem (Solved)

I have a simple gun, it clones a part that has a script that just detects hits by making a ray from it’s current position and it’s last position that is in replicated storage and then uses a tween to move it to the target position. For some reason, the bullet is only seen server-side. It can still detect hits and those hits are replicated, just not the bullet itself. I tried disabling StreamingEnabled since that seemed to be a culprit of situations similar to this, but to no avail. I also checked the LocalScripts in my game and couldn’t find anything that would delete it.

main script code for gun:

local ts = game:GetService("TweenService")
local firesound = script.Parent.Handle.Fire

local bulletspeed = script.Parent.Handle.bulletspeed.Value
local range = script.Parent.Handle.maxrange.Value

script.Parent.Activated:Connect(function()
	firesound:Play()
	script.Parent.muzzle.flash.Enabled = true
	
	delay(0.1, function()
		script.Parent.muzzle.flash.Enabled = false
	end)

	local clone = game.ReplicatedStorage.bullet:Clone()
	clone.CFrame = script.Parent.muzzle.CFrame

	clone.LimbDmg.Value = script.Parent.Handle.LimbDmg.Value
	clone.TorsoDmg.Value = script.Parent.Handle.TorsoDmg.Value
	clone.HeadDmg.Value = script.Parent.Handle.HeadDmg.Value

	clone.Parent = script.Parent.Parent
	
	local r = math.random(-50,50)
	local tweentarg = script.Parent.muzzle.Position + ((script.Parent.muzzle.CFrame.LookVector + Vector3.new(r,r,r)) * range)
	print(tweentarg)

	local goal = {}
	goal.Position = tweentarg

	local tween = ts:Create(clone,TweenInfo.new(script.Parent.Handle.bulletspeed.Value),goal)
	tween:Play()

	clone.Script.Enabled = true

	tween.Completed:Connect(function()
		clone:Destroy()
	end)
end)

I can show the localscripts in it as well if needed, but I am pretty confident they aren’t the reason.
Also don’t mind the ‘r’ value and what it’s being used for, I was testing bullet spread.
Any help is appreciated!

Actually I figured out the issue myself after a while! I was parenting the cloned bullet to the character since that’s what I do for npcs and it had worked before, but since I was also trying to make it a first-person game, the bullet ended up becoming transparent along with the rest of the body. I fixed this by simply changing it so it now parents to the tool instead. So, yeah. To anyone reading this: don’t make a stupid mistake like I did

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.