I made a Booth where a Player can claim it as their own & they can edit it to their own preference. Add text to their own preference & also a Image. My main issue is that I can’t figure out how to actually apply the change or check if a player is typing in a textbox for instance and then change the text and apply it.
I also want to achieve the same concept but with a Image ID.
I’ll show my code below.
Any help will be appreciated.
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
local BoothEvent = game.ReplicatedStorage.BoothEvent
local BoothGui = game.StarterGui.BoothGui
local LocalPlayer = Players.LocalPlayer
local PlayerBoothGui = LocalPlayer.PlayerGui:WaitForChild("BoothGui")
BoothEvent.OnClientEvent:Connect(function()
PlayerBoothGui.Enabled = true
local CloseButton = PlayerBoothGui.Frame.CloseButton
CloseButton.MouseButton1Click:Connect(function()
if PlayerBoothGui.Enabled == true then
PlayerBoothGui.Enabled = false
print("Closed Successfully")
end
local SubmitButton = PlayerBoothGui.Frame.SubmitButton
local TextBox = PlayerBoothGui.Frame.Frame.TextBox
local Booth = game.Workspace.Booth.BillboardGui.TextGui2
SubmitButton.MouseButton1Click:Connect(function()
if TextBox ~= "" then
else
print("You have to type something")
end
end)
end)
end)
print("BoothEvent fired Successfully")
I wrote something here it still can’t figure out how to actually make it change the text
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
local ChatService = game:GetService("Chat")
local RemoteEvent = game.ReplicatedStorage.BoothEvent
local BoothGui = game.StarterGui.BoothGui
local LocalPlayer = Players.LocalPlayer
local PlayerBoothGui = LocalPlayer.PlayerGui:WaitForChild("BoothGui")
RemoteEvent.OnClientEvent:Connect(function()
PlayerBoothGui.Enabled = true
PlayerBoothGui.Frame.BackgroundTransparency = 0
local SubmitButton = PlayerBoothGui.Frame.SubmitButton
local CloseButton = PlayerBoothGui.Frame.CloseButton
local BoothText = game.Booth.SurfaceGui.FrameGui.TextGui.Text
CloseButton.MouseButton1Click:Connect(function()
if PlayerBoothGui.Enabled == true then
PlayerBoothGui.Enabled = false
game.ReplicatedStorage.ChatEvent.OnServerEvent:Connect(function(player, BoothText)
ChatService:FilterStringForBroadcast(BoothText, player)
-- How do I now change booth text in here
end)
end
end)
print("RemoteEvent fired Successfully")
end)