I’m trying to change the skybox when I hover over a text button. How would I go about this?
1 Like
Get your skyboxes into a folder. Make a script where if the MouseEnter event is fired it’ll move the current skybox into the folder and the new one into game.Lighting
Insert a textbutton.
Now, if you want to make it local, so like only that player can see the new skybox who hovered the mouse over the gui, insert a localscript.
script.Parent.MouseEnter:Connect(function()
game.Lighting.Sky --change the skybox you want
end)
If you want to make it back to the origin after the player hovered its mouse, say
local skybox = false
script.Parent.MouseEnter:Connect(function()
if not skybox then
game.Lighting.Sky --First skybox
skybox = not skybox
else
game.Lighting.Sky --Origin skybox
skybox = not skybox
end
end)
This worked. Thanks very much. I was trying something local similar to this but couldn’t figure it out. Thanks though.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.