I made several scripts was an example interaction with NPCs and Custom Explosions, which were in blocks , All scripts that are not in StarterGui or StarterPack not work in Multiplayer only in Solo , already tried to put in a Local script or in a Normal Script, I tried to use FilteringEnabled or without FilteringEnabled and nothing works, does anyone know what I can do ?

The Script :


IntPart = script.Parent.Interact
Children = script.Parent.Parent.Door:GetChildren()
Children2 = script.Parent.Parent.OpenedDoor:GetChildren()

while wait() do
	for i,v in pairs(game.Players:GetChildren()) do
		if (v.Character.Torso.Position - IntPart.Position).magnitude <= 10 then
			v.PlayerGui.IntGuis[IntPart.Type.Value].Visible = true
			script.Key.Disabled = false
			
			for i = 1,#Children do
				if Children[i].ClassName == "Part" then
					Children[i].Transparency = 1
				end
			end
			for i = 1,#Children2 do
				if Children2[i].ClassName == "Part" or Children2[i].ClassName == "UnionOperation" then
					Children2[i].Transparency = 0
				end
			end
		else
			v.PlayerGui.IntGuis[IntPart.Type.Value].Visible = false
			script.Key.Disabled = true
			
			for i = 1,#Children do
				if Children[i].ClassName == "Part" then
					Children[i].Transparency = 0
				end
			end
			for i = 1,#Children2 do
				if Children2[i].ClassName == "Part" or Children2[i].ClassName == "UnionOperation" then
					Children2[i].Transparency = 1
				end
			end
		end
	end
end

1 comment

0

Can you post the script?