Roblox Forum banner
1 - 5 of 5 Posts

·
Registered
Joined
·
3 Posts
Discussion Starter · #1 ·
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
 

·
Registered
Joined
·
562 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
 

·
Registered
Joined
·
3 Posts
Discussion Starter · #3 ·
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
 

·
Registered
Joined
·
562 Posts
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.
 
1 - 5 of 5 Posts
Top