Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how do i change skybox with region 3?

I was wondering how do I change the skybox when you are in a certain area, with script region 3, with which the script detects the player and skybox updates to skybox within region 3, but when you leave the area return skybox to normal.

4 comments

0

Using Region3's for this situation would be very costly. If the zone is a circle you could use magnitude checks. If you have big parts representing the zones you could use .Touched. Or another alternative is to do position checks on each end of the box.

0

how? give me examples plz.

0

This isn't a request site

0

@TTChaos, he can request small things if he likes. Like examples. He cannot ask for a whole script though.

2 answers

✓ Accepted answer

In a local script set the skybox so it will be local to that player.

1 comment

0

Region3 is not needed.

Following @Nickuhhhhhhhhhh's suggestion, you could make a skybox change with the "Touched" event.

local SkyboxPart = workspace.SkyboxPart -- or wherever the part is
local Lighting = game:GetService("Lighting")
local Sky = Lighting.Sky

local function ChangeSkybox(Part)
	if Part.Parent:FindFirstChild("Humanoid") then
		Sky.SkyboxBk = ""
		Sky.SkyboxFt = ""
		Sky.SkyboxRt = ""
		Sky.SkyboxLf = ""
		Sky.SkyboxUp = ""
		Sky.SkyboxDn = ""
	end
end

SkyboxPart.Touched:Connect(ChangeSkybox)

This discussion is preserved as it was. New answers, comments, and votes are closed.