Dripping effect different on client on server

Hi, i found this dripping effect script on here and it works perfectly on server side but doesnt work on client side

while wait(1.5) do -- You can replace true with the delay
	local pos = game.Workspace.blooddrip1 -- I used a workspace part; you can change it back to script.Parent

	local b = Instance.new("Part")	
	b.Position = pos.Position + pos.CFrame.lookVector
	b.Size = Vector3.new(0.2, 1, 0.2)
	b.formFactor = 2
	b.Shape = 1
	b.BrickColor = BrickColor.new("Bright red")
	b.Transparency = .4 -- changed the transparency because it was too transparent
	b.TopSurface = "Smooth"
	b.BottomSurface = "Smooth"
	b.CanCollide = false
	b.Parent = game.Workspace
	b.Velocity = Vector3.new(0, 0, 0)

	game:GetService("Debris"):AddItem(b, 1) -- The lifetime variable wasn't used anywhere else
end

Set the network owner of the instance to the closest player.

local function getNearestPlayer(p)
	local plr,dist = nil,math.huge
	for _,v in game.Players:GetPlayers() do
		if v:DistanceFromCharacter(p) < dist then
			dist = v:DistanceFromCharacter(p)
			plr = v
		end
	end
	return plr
end

while wait(0.25) do -- You can replace true with the delay
	local pos = workspace.blooddrip1 -- I used a workspace part; you can change it back to script.Parent

	local b = Instance.new("Part")	
	b.Position = pos.Position + pos.CFrame.lookVector
	b.Size = Vector3.new(0.2, 1, 0.2)
	b.formFactor = 2
	b.Shape = 1
	b.BrickColor = BrickColor.new("Bright red")
	b.Transparency = 0.4 -- changed the transparency because it was too transparent
	b.TopSurface = "Smooth"
	b.BottomSurface = "Smooth"
	b.CanCollide = false
	b.Parent = workspace
	b.Velocity = Vector3.new(0, 0, 0)
	b:SetNetworkOwner(getNearestPlayer(b.Position))

	game:GetService("Debris"):AddItem(b, 1) -- The lifetime variable wasn't used anywhere else
end

1 Like


idk whats happening for me then, its just sitting there, now both on client and server and isnt flashing but DOES work if i just run it completely server side using the run test option

nvm i js had a plugin messing with it, thanks so much for helping me fix it

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