HighLights Doesnt Work in game, but it does in studio, Why?

hi guys, im making vizuals, and all that stuff, but for some reason doesnt work in game, like the same vizual but playing in the actual roblox, but it works in the studio, why???

i try to search and the only thing i read is that “make it from instance” just that.

function module.B(player, way)
	local char = player.Character
	local human = char["Humanoid"]
	local head = char["Head"]
	local rarm = char["Right Arm"]
	local larm = char["Left Arm"]
	local rleg = char["Right Leg"]
	local lleg = char["Left Leg"]
	local hrp = char["HumanoidRootPart"]
	local torso = char["Torso"]
	local particle = script.Efx.DD:Clone()
	local trail = script.Efx.Trail:Clone()
	local highlight = Instance.new("Highlight", char) --script.Efx.Highlight:Clone()
	--highlight.Parent = char
	highlight.FillTransparency = 1
	highlight.OutlineTransparency = 1
	highlight.FillColor = Color3.fromRGB(8, 12, 15)
	highlight.OutlineColor = Color3.fromRGB(27, 25, 67)
	highlight.DepthMode = Enum.HighlightDepthMode.Occluded
	
	task.spawn(function()
		local att = Instance.new("Attachment", hrp)
		particle.Parent = att
		local weld = Instance.new("Weld", hrp)
		weld.Part0 = hrp
		weld.Part1 = trail
		trail.Parent = hrp
		
		twen:Create(highlight, TweenInfo.new(0.1), {FillTransparency = 0}):Play()
		twen:Create(highlight, TweenInfo.new(0.1), {OutlineTransparency = 0}):Play()

		for i = 3, 0, -1 do
            something

			task.wait(0.08)
		end
		game.Debris:AddItem(att, 0)
		game.Debris:AddItem(trail,0)
		game.Debris:AddItem(weld,0)


		local thing = twen:Create(highlight, TweenInfo.new(0.1), {FillTransparency = 0})
		thing:Play()
		thing.Completed:Connect(function()
			highlight:Destroy()
		end)

		twen:Create(highlight, TweenInfo.new(0.1), {OutlineTransparency = 0}):Play()
	end)

	spawn(function()
		local soundmove = script.Efx.Dash:Clone()
		soundmove.Parent = char.HumanoidRootPart
		soundmove:Play()
		soundmove.PitchShiftSoundEffect.Octave = math.random(0.5, 1.25)
		game.Debris:AddItem(soundmove,2)
	end)
end

im pretty sure i did everything ok right?, guys?

that’ll error because of the word “something”
If that’s not in the actual code and you censored that block for some reason, should’ve mentioned it or put that in a comment

Yeah I saw that too, can’t know what exactly he runs there. It might cause errors or not so I cannot replicate his code and debug it in the way he programmed it.

Could be related to how you call the function in-game. Where’s this used?

Highlight limit was increased to 255 last update (694)

3 Likes

uhh, i was just deleting my code, i dont want to share my full code ofc

i do in client, this is one module, inside of a big module script that handles every module script inside of it, then call the function inside of a local script that shoots a remote event on client