Attempt to call a Instance value

I am making a mod menu and when I am trying to fire a remote event for textbox it just gives me the error as I said on the title. What could I do to fix it?

Localscript 1:

local player = game.Players.LocalPlayer
local Frame = script.Parent.Frame
local Frame2 = script.Parent.Frame2
local Frame3 = script.Parent.Frame3

Frame.RadioButton.MouseButton1Down:Connect(function()
	script.Parent.Click:Play()
	local Bar = Frame.InputText
	game.ReplicatedStorage.ModMenuEvents.Radio:FireServer(Bar.Text)
end)

Serverscript:

game.ReplicatedStorage.ModMenuEvents.Radio.OnServerEvent:Connect(function(player, Text)
	local Name = player.DisplayName.."'s Admin Message"
	local Image = "rbxassetid://14811398587"
	game.ReplicatedStorage.Events.BroadcastText(Text, Image, Name)
end)

Localscript 2:

game.ReplicatedStorage.Events.BroadcastText.OnClientEvent:Connect(function(Text, Image, Name)
	if Text == "" then
		script.Parent.Face.Visible = false
		script.Parent.Frame.Visible = false
	else
		if script.Parent.Parent.Parent.Playing.Value == true then
			script.Parent.Frame.Visible = true
			script.Parent.Face.Visible = true
			script.Parent.Frame.Story.Text = Text
			script.Parent.Face.Image = Image
			script.Parent.Frame.NameText.Text = Name
			script.Parent.Sound:Play()
		else
			script.Parent.Frame.Visible = false
			script.Parent.Face.Visible = false
		end
	end
end)

Edit: The error is coming from the serverscript

It seems like that instead of firing a remote event, you’re trying to grab an instance on line 4 of your server script. It should be a simple fix if I’m correct:

game.ReplicatedStorage.Events.BroadcastText:FireClient(Text, Image, Name)

Thanks for helping me fix that I forgot to just fire the event

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.