How would you script a window like this?

  • What are you attempting to achieve? (Keep it simple and clear)
    A window that changes transparency and colour depending on which side you look at it from (I don’t mean iridescence though.}

  • What is the issue? (Keep it simple and clear - Include screenshots/videos/GIFs if possible)
    A window can’t be both colours.

  • What solutions have you tried so far? (Have you searched for solutions through the Roblox Wiki yet?)
    I think this would involve scripting but still, how would you change the colour without other players seeing it? I’m assuming local scripting?

Examples of the window. Ignore the text because it was hard to capture them without being arrested.
From the outside:


From the inside:

I know that the script wouldn’t involve teams because prisoners can see through the glass if they are inside.

I assume it would be a local script for the clients that would update the window transparency/colour dependent on the magnitude, e.g. if the magnitude from the window to the player is >/< then make it more transparent/more opaque for the client.

Not scripting, you can place a black decal / image on one side and the other you can see right through it.

4 Likes

I don’t think it requires any scripting at all, just a black semi-transparent surface gui on the left or right side of the window.

1 Like

That should also work perfectly fine.

So then how would it be different for the person on the other side of the window?

I wouldn’t have posted if i saw what u posted… mb

You can place a decal OR… in a more derp way because it’s derp you can use
CFrame:PointToObjectSpace

Example

local CFramee = workspace.Door.CFrame:PointToObjectSpace(HumanoidRootPart.Position)
if CFramee.Z > 0 then
print('Front!')
elseif CFramee.Z < 0 then
print('Back!')
end

Same thing though, you’re good.