Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Where do I fix my string/int text to copy my chat?

Asked by
TechModel 118
2 years ago
Edited 2 years ago

I searched up this topic im working on and nothing really helps me get a clear understanding how to really convert string to character form. My script works by needing the character form, but my army wont repeat as I say in the chat. Of course Only people with these scripts copy my request.

game.Players.PlayerAdded:Connect(function(plr)

    plr.Chatted:Connect(function(Message)
        local SplitMessage = Message:split(" ")
        if SplitMessage[1] == "hi" and plr.UserId == 12345 then
            local Name = SplitMessage[2]
            local Reason = Message:split(Name)[2]
            local Text = tostring(Reason)
            if Reason ~= nil then
                game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(Text, "All")
            end
        end
    end)
end)

Answer this question