Cant use function FireClient()

You can write your topic however you want, but you need to answer these questions:


BRO İTS ON SERVER

I checked some posts and they are just telling that it should be fired from the server

ThrowHookEvent.OnServerEvent:Connect(function(player: Player, ThrowPos: Vector3)
	local CollectedItems = {}
	local Character = player.Character
	local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
	local HandBone = HumanoidRootPart.Bone["Bone.001"]["Bone.004.R"]["Bone.004.R.001"]["Bone.006.R"]["Bone.007.R"]["Bone.007.R.003"]

	local fakeHook = ReplicatedStorage["Item Models"].Viewmodel.Hook:Clone()
	fakeHook.Name = player.Name .. "Hook"
	fakeHook.CFrame = CFrame.lookAt(Character.HumanoidRootPart.Position + Character.HumanoidRootPart.CFrame.LookVector * 5, Character.HumanoidRootPart.Position + Character.HumanoidRootPart.CFrame.LookVector * 10) * CFrame.Angles(0, math.rad(90), math.rad(-90))
	fakeHook.Position = HandBone.TransformedWorldCFrame.Position
	fakeHook.Parent = workspace

	local hookAttachment = fakeHook.RodConnector
	local handAttachment = Instance.new("Attachment", HandBone)
	local Rod, connection = NoPhysicsRodModule.connectParts(hookAttachment, handAttachment, 0.5, "ServerRod", HumanoidRootPart)

	ClearHooks:FireClient(player, "Invis")

	local returnHook = false
	local startPos = HandBone.TransformedWorldCFrame.Position
	local endPos = Vector3.new(ThrowPos.X, OceanHeight, ThrowPos.Z)
	local startTime = tick()

	spawn(function()
		while task.wait() do
			local t = tick() - startTime

-- I mean rest isnt important since its a server script it should fire the client

I got no idea whats wrong I cant test out the game it used to work perfectly

5 Likes

That’s very weird and unexpected. Can you send a screenshot of what ClearHooks is equal to and an image from the explorer so we can ensure it is a RemoteEvent. If everything is correct, restart studio. If that doesn’t work, submit it as a bug.

Screenshot looks so damn cursed LMAOOOO
Please give more code regarding ClearHooks becouse its hard to understand what is going on.
I recomend you to replace spawn into task.spawn/coroutine and tick() into os.clock()

As you can see the remote event and the server script

1 Like

Very weird. Just try restarting studio and then submit a bug report if that doesn’t work. I don’t know what else you could do though.

1 Like

Can you please try setting the RunContext property to be Server?
It’s certainly an odd issue xD

AGAİN HAPPENİNG yeah Im just gonna do a bug report. . . Tho this is really weird :sob:

Smae

If you test in an actual server (i.e. not in Roblox Studio), does the issue still occur?

Also, do other instances of :FireClient work, both in the same script and in other scripts

Oh it works on Roblox, and no I dont have any other fireclient functions

Your installation of Roblox Studio may have corrupted somehow. Can you please try reinstalling it and see if the issue persists?

1 Like

Yessir ill be back when I do it

Okay still happening. … .character error limit . .

What on earth…?

If you’re willing, can you please add me to the team create so I can test a few things and try to figure out what on earth is happening? (Will also further help to test if it’s your PC)

(no worries if not - I can try to come up with more ways you can test over the devforum)

Thank you for the help :pray: join my group so I can add u role

Joined.
(I’ll leave the group after we figure out the issue, so you won’t need to demote me afterwards)

1 Like

u should be added can u check?

I seem to be.
What action was it that causes the error to occur, so I can quickly test it?

when u hold Mousebutton 1 and throw the hook


Throwing the hook works for me ;-;


When you reinstalled it, how did you do it?