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

How can i transfer a camera to another part after a certain object is touched?

The script detects the player who touched the part, but it won't transfer the camera to the designated part. Can i get some help?

wait()


function onTouched(part)

	local h = part.Parent:FindFirstChild("Humanoid")

local character = h.Parent
local player = game.Players:GetPlayerFromCharacter(character)


local cam = workspace.CurrentCamera




if h~=nil then
	
	cam.CameraType = "Scriptable"
	
	cam.CFrame = workspace.Cam.CFrame
	
	
	
	
end
end
script.Parent.Touched:Connect(onTouched)

It's just a regular script inside a part.

1 answer

Go And Get This Plugin Called Cutscene Editor Plugin By CloneTrooper1019 You Can Choose To Make A Player Entered Script, A Part Touched Script Or Just A Script. It Says Its Deprecated But It Still Works.

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