Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

OnClientEvent is not a valid member of RemoteEvent?

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

0

Nvm i figured it out

1 answer

There should be a feature to close questions If the person who asked it found the answer themselves, without having to delete it, lol.

2 comments

0

There is when you have 200 reputation you can hit moderate

0

Oh thats cool, thx

This discussion is preserved as it was. New answers, comments, and votes are closed.