As I said before, :Interpolate() is deprecated and although this does not mean that it’s the cause why it doesn’t work, you shouldn’t be using it anyway as it’s bad practice, use TweenService.
Example:
--Assuming there's a reference to TweenService
local cam = game.Workspace.Camera
TweenService:Create(cam, TweenInfo.new(5), {CFrame = FinalCFrame}):Play()
Where FinalCFrame is a CFrame resulting from the interpolation of Position and Focus which you can obtain using :Lerp()
I know I listened to your advice and I will delete the interpolate() though that’s is not the issue the issue is that the client event won’t fire up Idk why
local player = game.Players.LocalPlayer
local TweenService = game:GetService("TweenService")
local CameraIn = game.ReplicatedStorage.CameraIn
local PlayerCamera = game.ReplicatedStorage.PlayerCamera
local function shake() local camera = game.Workspace.CurrentCamera for i = 1,10 do wait()
camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(0,2,0) wait()
camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(0,-2,0) end end
CameraIn.OnClientEvent:Connect(function(plr,Position,Focus,Time)
print(1)
local cam = game.Workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Scriptable
local tween = TweenService:Create(cam, TweenInfo.new(5), {CFrame = Position}):Play()
print(4)
shake()
script.Sound:Play()
end)
PlayerCamera.OnClientEvent:Connect(function()
local camera = game.Workspace.CurrentCamera
script.Sound:Stop()
camera.CameraType = Enum.CameraType.Custom
end)
I did & I fixed it server side looks perfect to me it even prints variable that is after the :FireClient event
local played = false
local CameraIn = game.ReplicatedStorage.CameraIn
script.Parent.T.Touched:Connect(function(v)
if v.Parent:FindFirstChild("Humanoid") then
local plr = game.Players:GetPlayerFromCharacter(v.Parent)
if played == false then
played = true
print(3)
CameraIn:FireClient(plr, workspace.CameraPosition.CFrame, workspace.CameraAim.CFrame, 5)
print(1)
wait(1)
played = false
v.Parent.Humanoid.Health = 0
end
end
end)
That is impossible if the event is correctly referenced. I am starting to wonder…is the LocalScript located in a place where it can run? Does it run in the first place?