I made a tool with an invisible script (Filtering Enabled is on, of course)
script

script.Parent.Equipped:Connect(function()
	local event = game.ReplicatedStorage.Invisible
	local character = script.Parent.Parent
	local player = game.Players[character.Name]
	event:FireClient(player, character)
end)

local script

local event = game.ReplicatedStorage.Invisible
event.OnClientEvent:Connect(function(character)
	local tablename = character:GetChildren()
	for i, k in pairs(tablename) do
		if k.ClassName == "Part" then
			if k.Name == "Head" then
				k.face.Transparency = 1
				k.Transparency = 1
			elseif k.Name ~= "Head" then
				k.Transparency = 1
			end
		
		elseif k.ClassName == "Accessory" then
			k.Handle.Transparency = 1
		end
		end
end)

The local script is used to make the player who equipped the tool invisible it works with 1 player, not the others I need help, please!

14 comments

0

your naming convention is going to cause you problems in the future. i dont know if "character" is actually the player's character. if it is, thats a problem, because :FireClient()'s first argument is the client being fired to, therefore this will raise an error. additionally, OnClientEvent only returns the variants sent through the remote

0

this means that if the character variable is actually a player, there will be no parameters in the OnClientEvent function

0

what do you mean it works with 1 player? since the transparency is being set in localscript, wouldnt that mean only one play sees it

1

i think you need to set transparency in serverscript

0

unless you want one player to be invisible....

0

You won’t receive the arguments regarding the Character, in fact the Remote shouldn’t fire in the first place. You must pass the Client being fired to, following the arguments you desire to pass too, only then can you pick up the Character.

0

Note: ServerScripts are venerable outside of their designated location (ServerScriptService) it’s proffered to leave them there as it is inaccessible.

0

You can also simplify your second Conditional with just 'else'

0

what if he has to worry about it being a decal or a mesh or something

0

Question is not very clear.

0

It’s written in his conditional, it says if it isn’t named “Head”

0

The beginning statement is opposite, therefore elseif isn’t required

0

Do you guys have any ideas to fix it with Filtering Enabled?

0

Script Edited (My fault, sorry)