I am trying to create a kind of stealthy game and I need a way to make my characters shimmy across ledges/walls. While the people are shimmying across these walls, I need the camera to be stationed in a third person type way. This is the code I have, but when I try it out in the server, it takes the Server's camera instead of the characters. It was actually quite funny to watch, but nonetheless, I don't know how to get the person's camera when touching the brick. Here is my code.
local part = script.Parent
local debounce = false
part.Touched:connect(function(hit)
wait(.5)
local character = hit.Parent:findFirstChild("Humanoid")
if character and debounce == false then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player and debounce == false then
debounce = true
wait(.1)
local cam = workspace.CurrentCamera
cam.CameraSubject = workspace.Cam
cam.CameraType = "Attach"
cam.CoordinateFrame = CFrame.new(-30.1, 5.8, -81.1)
cam.Focus = CFrame.new(-30.1, 5.8, -93.1)
end
end
end)

1 comment
How can I signal the client To alter the cameras? I've been researching cameras for a while now and I've been on this website [http://wiki.roblox.com/index.php?title=Camera_manipulation] but this website is giving me instructions on player added, I don't want the camera to be manipulated on player added, can you give me an example of a way to signal the client on player touched?