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

Can't set camera seetings? if it's in scriptable mode

Asked by
tomekcz 174
6 years ago

this script is local script and its located in startergui

1workspace.tomekczShop.Part.Touched:Connect(function(player)
2    if player.Parent:FindFirstChild("Humanoid") ~= nil then
3        workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable        
4        workspace.CurrentCamera.CameraSubject = workspace.Laptop2.CameraPart
5 
6        script.Parent.ScreenGui.Backround.Visible = true
7    end
8end)

It set camera to scriptable but does not move into this part pos

0
Do you know how misleading `player` is User#24403 69 — 6y
0
you dont need to set the CameraType to scriptable to set the CameraSubject, just leave it as Custom User#23365 30 — 6y
0
also CameraSubject isnt CFrame User#23365 30 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

You should set the camera's CFrame to where you want it to go.

1workspace.tomekczShop.Part.Touched:Connect(function(player)
2    if player.Parent:FindFirstChild("Humanoid") ~= nil then
3        workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable        
4        workspace.CurrentCamera.CFrame = workspace.Laptop2.CameraPart.CFrame
5 
6        script.Parent.ScreenGui.Backround.Visible = true
7    end
8end)
Ad

Answer this question