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
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
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.
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)
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.
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.