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

How do you create a camera that reflects on the SurfaceGui object?

I want to create a camera that is display on an object of a SurfaceGui, but where do I begin? I am new to camera manipulation.

1 comment

0

I'm inclined to say that what you're envisioning is not possible, but it's a little unclear what you're actually describing. Can you give a more concrete example, like what this would look like in game?

1 answer

-- Conditions to change the camera above ^

game.Workspace.Camera.CameraSubject = game.Workspace.Part -- change the workspace.Part to whatever you need to change the camera to focus on.

-- If you have Filtering Enabled on, convert this to a local script. However if the camera is ------------supposed to change you can use a server script to pick up the event and then use a remote to ---change the subject with a local script (do this unless you want to have everyone's camera ---------change, which might be bad.)

--//Server script:
script.Parent.Touched:connect(function(hit)

local rem1 = Instance.new("RemoteEvent)
rem1.Name = "CameraChange"
rem1.Parent = game:GetService("ReplicatedStorage")
rem1:FireClient(hit)
end)
--//


--//Local script:
game:GetService("ReplicatedStorage").CameraChange.OnClientEvent:connect(function(hit)
game.Workspace.Camera.CameraSubject = game.Workspace.Part

end)

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