Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago

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.

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? EmilyBendsSpace 1025 — 4y

1 answer

Log in to vote
0
Answered by
Gojinhan 353 Moderation Voter
4 years ago
Edited 4 years ago
-- 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)
Ad

Answer this question