I'm trying to make a script where a remoteEvent is fired from a server script and then connected in a local script and in the output I get "OnClientEvent is not a valid member of RemoteEvent" and I'm very confused.
Here's the script
local tweenService = game:GetService("TweenService")
local camera = game.Workspace.CurrentCamera
cutsceneTime = .9
local tweenInfo = TweenInfo.new(
cutsceneTime,
Enum.EasingStyle.Bounce,
Enum.EasingDirection.Out,
0,
false,
0
)
local function Jumpscare(player)
local function Tween(part1,part2)
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = part1.CFrame
local tween = tweenService:Create(camera, tweenInfo , {CFrame = part2.CFrame})
tween:Play()
wait(cutsceneTime)
camera.CFrame = part2.CFrame
end
wait()
Tween(game.Workspace.Jumpscare.JCam1,game.Workspace.Jumpscare.JCam2)
end
game.ReplicatedStorage.Jumpscare.OnClientEvent = Jumpscare()

1 comment
Nvm i figured it out