So I wanted to trigger a camera change after a player touched a part and this is the script ive got but its not working. The script is in the part that the player will be touching. Thats why it says script.Parent

local Cam = workspace.CurrentCamera
local Camera2 = game.Workspace.Cameras.Camera2

-------------------------------------------------------------------

Cam.CameraType = Enum.CameraType.Scriptable
Cam.CameraSubject = Camera2

-------------------------------------------------------------------

script.Parent.Touched:connect(function()
	Cam.CoordinateFrame = CFrame.new(Camera2.Position)
end)

5 comments

0

I'm having problems with touched events..so idk sorry! But all i know is that the camera part is correct

0

Put the script in a LocalScript inside of StarterPlayerScripts, then just name the brick that needs to be touched uniquely. When putting in the touched event do game.Workspace.UniquelyNamedPart.Touched:Connect()

0

I tried that and it still doesnt work local Cam = workspace.CurrentCamera local Camera2 = game.Workspace.Cameras.Camera2 ------------------------------------------------------------------- Cam.CameraType = Enum.CameraType.Scriptable Cam.CameraSubject = Camera2 ------------------------------------------------------------------- game.Workspace.Cameras.Camera2Trigger.Touched:connect(function() C

0

Sorry it wouldnt let me post all the script

0

WOuldnt you want it to be under the touched part?