How Do i send a Text That You Typed on The TextBox And Through The RemoteEvent

hi, i’m trying to send a Text That You Typed on The TextBox And Through The RemoteEvent But Its Not Working.

This is The Server Script

game.Players.PlayerAdded:Connect(function(Player)
	local PlayerSeattings = Instance.new("Folder", Player)
	PlayerSeattings.Name = "PlayerSeattings"

	local DamageIndicatorImage = Instance.new("StringValue", PlayerSeattings)
	DamageIndicatorImage.Name = "DamageIndicatorImage"
	DamageIndicatorImage.Value = 6976119485
	
	
	game.ReplicatedStorage:FindFirstChild("RemoteSettings"):FindFirstChild("DamageIndicator").OnServerEvent:Connect(function(player, Image)
		if Image then
			DamageIndicatorImage.Value = Image
		elseif DamageIndicatorImage.Value == "" then
			DamageIndicatorImage.Value = 6976119485
		end
	end)
	
end)


This is The LocalScript

local Players = game:GetService("Players")
local DamageIndicatorImage = Players.LocalPlayer:FindFirstChild("PlayerSeattings"):FindFirstChild("DamageIndicatorImage")

local Input = script.Parent:FindFirstChild("id")
local ImageLabel = script.Parent.Frame:FindFirstChild("ImageLabel")

local Con

game.ReplicatedStorage:FindFirstChild("RemoteSettings"):FindFirstChild("DamageIndicator"):FireServer(Input.Text)
ImageLabel.Image = "rbxassetid://" .. DamageIndicatorImage.Value

if Con then
	Con:Disconnect()
end

ImageLabel.Image =  "https://www.roblox.com/asset-thumbnail/image?assetId="..DamageIndicatorImage.Value.."&width=420&height=420&format=png"

Con = Input:GetPropertyChangedSignal("Text"):Connect(function()	
	game.ReplicatedStorage:FindFirstChild("RemoteSettings"):FindFirstChild("DamageIndicator"):FireServer(Input.Text)
	ImageLabel.Image =  "https://www.roblox.com/asset-thumbnail/image?assetId="..DamageIndicatorImage.Value.."&width=420&height=420&format=png"
end)

while true do
	if ImageLabel.Image == "https://www.roblox.com/asset-thumbnail/image?assetId=&width=420&height=420&format=png" then
		ImageLabel.Image = "rbxassetid://6976119485"
	end
	wait()
end

Please Tell Me What’s Wrong

1 Like

Well, Firstly of all. The text changes Live, So that means no property signal has to be detected. IF i had access to the game, I would gladly fix it for you.
There is info about textboxes here

1 Like

well sure, should i add you in team create?

1 Like

I wouldn’t randomly add someone to team create… I would google around a bit more or wait for another response.

One thing you can do is a heartbeat/while true loop which checks whether the string in the TextBox matches your desired text. I honestly thought that the method you display is the correct one, but I guess it doesn’t work.

2 Likes

ah, okay thank you for the response

1 Like

IF you added me as a friend, you could do that, As i am experienced in this as i made an admin system with a code execution system.

1 Like

Also, if ur trying to detect if it matches the text, you could do a focus lost function

local function FocusLost(enterpressed,inputobject)
   if enterpressed then
        if textbox.text==desiredtexttomatch then
            --urcodehere
        else
            --secondarycode
        end
    end
end
textbox.FocusLost:Connect(FocusLost)
1 Like

no i’m trying to send a text to the server, then place the text in the value

Use a remote event.
then fire it to the server

i tried it, it still wouldn’t work

Send me a friend request on roblox, Then once i have time i will look into it.
Also, Make a seperate game with the same function that u just did.
Because then it will make it easier for me.

2 Likes

there i sent a request and ill make a seperate game

Ill help when i am available.
About 16:00 CET to 17:00 CET is when i am available

Bro, chill, you can’t just ask people to let you join their game, I mean if you don’t have enough information, just ask.

Anyway, your problem is that you are changing DamageIndicatorImage on both the client and server, which means they basically are holding two different values.

1 Like

Thanks This Actually Helped I Manage to To Figured It Out

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