I made this script that makes me be able to put off my mask and put it back on by pressing M. However, players can only see me with invisible head but not with invisible mask. Its like accessory, I cant make it invisible for others.

I thought about cloning the mask and parenting it to as a new mask but I cant make it work. Any help please?

Local Script inside StarterCharacterScripts

local plr = game:GetService("Players").LocalPlayer
local char = plr.Character
local head = char:FindFirstChild("Head")
local mask = char:WaitForChild("Chest").Mask --Chest is a morth model that has the mask

local uis = game:GetService("UserInputService")

maskIsOff = false


uis.InputBegan:connect(function(key)
	if maskIsOff == false then
		if key.KeyCode == Enum.KeyCode.M then
			head.Transparency = 0
			mask.Transparency = 1
			maskIsOff = true
		end
	elseif maskIsOff == true then
		if key.KeyCode == Enum.KeyCode.M then
			head.Transparency = 1
			mask.Transparency = 0
			maskIsOff = false
		end
	end
end)

7 comments

0

You'll have to use remote events so it occurs in other clients

0

What exactly are "Remote Events"?

0

Remote events and functions allow for client-server communication or server-client communication. You are handling user input, which should be handled on the client, so you can use remotes to communicate with the server.

0

Here's a video that should really help you out with RemoteEvents https://www.youtube.com/watch?v=4Dc_bri9mjs

0

So I should use Remote Events to make other players to see the invisible mask. Thank you ill look into Remote Events. :)

0

You need remote events to make a filtering enabled game, if you don't want a filtering enabled game, then nobody will be able to play your game except you and friends.

0

no, all games are forced into fe, whether it is private or public