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.
