Roblox Forum banner

Script won't work

219 Views 4 Replies 2 Participants Last post by  mikuba9
Hi guys!

i want to create a box in roblox, when you went into it i will change a your point of view from third person to first person and when you get out i will change agin to third person perspective,

i tried to write script but it won't work, here a script, and a picture of how it is supposed to work :)

have a nice day!!

zone = script.Parent
function cameraFirst1(hit) if
hit.Parent:FindFirstChild("Humanoid") then
local humanoid = hit.Parent:FindFirstChild("Humanoid")
humanoid.CameraMode = Enum.CameraMode.LockFirstPerson
end end function cameraClassic1(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local humanoid = hit.Parent:FindFirstChild("Humanoid")
humanoid.CameraMode = Enum.CameraMode.Classic
end end zone.Touched:Connect(cameraFirst1) zone.TouchEnded:Connect(cameraClassic1)




View attachment 69870
1 - 5 of 5 Posts
Hi guys!

i want to create a box in roblox, when you went into it i will change a your point of view from third person to first person and when you get out i will change agin to third person perspective,

i tried to write script but it won't work, here a script, and a picture of how it is supposed to work :)

have a nice day!!

zone = script.Parent
function cameraFirst1(hit) if
hit.Parent:FindFirstChild("Humanoid") then
local humanoid = hit.Parent:FindFirstChild("Humanoid")
humanoid.CameraMode = Enum.CameraMode.LockFirstPerson
end end function cameraClassic1(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local humanoid = hit.Parent:FindFirstChild("Humanoid")
humanoid.CameraMode = Enum.CameraMode.Classic
end end zone.Touched:Connect(cameraFirst1) zone.TouchEnded:Connect(cameraClassic1)




View attachment 69870
can you show me the original script? like a screenshot? the script is not clear for me. also i cannot see the screenshot
2
can you show me the original script? like a screenshot? the script is not clear for me. also i cannot see the screenshot
here you go, it also shows an error "CameraType is not a valid member of Humanoid "Workspace.otopoz.Humanoid" where "otopoz" is a nickname in the game

i also add picture how it should work and script ss
Handwriting Rectangle Font Parallel Slope
Rectangle Font Line Screenshot Software
See less See more
here you go, it also shows an error "CameraType is not a valid member of Humanoid "Workspace.otopoz.Humanoid" where "otopoz" is a nickname in the game

i also add picture how it should work and script ss
View attachment 69880 View attachment 69881
"CameraType is not a valid member of Humanoid "Workspace.otopoz.Humanoid""
i think cameratype is not usable/compatible in/with Humanoid. I do not know a fix, as i cant code in Lua.
"CameraType is not a valid member of Humanoid "Workspace.otopoz.Humanoid""
i think cameratype is not usable/compatible in/with Humanoid. I do not know a fix, as i cant code in Lua.
Thanks you for your time
  • Like
Reactions: 1
1 - 5 of 5 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top