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

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

Asked by
Echtic 128
4 years ago

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

Log in to vote
0
Answered by 4 years ago

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.

Ad

Answer this question