What do you want to achieve? Keep it simple and clear!
Want to make a stand(part) where you can edit for others to see.
What is the issue? Include screenshots / videos if possible!
For some reason it wont shop up for only there’s, it will show for the other stand too robloxapp-20210831-1955311.wmv (1.1 MB)
.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I did try many thing like youtube, devforum, and the devhub
--part1
local remoteEvent = game:GetService("ReplicatedStorage").EditMessage
local EditButtonUi = game.Players.LocalPlayer.PlayerGui:WaitForChild("EditingUi").EditButton
script.Parent.Parent.DoneButton.MouseButton1Click:Connect(function()
remoteEvent:FireServer("name1", script.Parent.Parent.GameName.Text)
remoteEvent:FireServer("description1", script.Parent.Parent.Description.Text)
game.Players.LocalPlayer.PlayerGui:WaitForChild("EditingUi").EditGui.Visible = false
EditButtonUi.Visible = true
end)
remoteEvent.OnClientEvent:Connect(function(type_, message)
if type_ == "name1" then
workspace.MainParts.Main1.SurfaceGui.GameNameLabel.Text = message
elseif type_ == "description1"then
workspace.MainParts.Main1.SurfaceGui.GameDescriptionLabel.Text = message
end
end)
--part2
local remoteEvent = game:GetService("ReplicatedStorage").EditMessage
local EditButtonUi = game.Players.LocalPlayer.PlayerGui:WaitForChild("EditingUi").EditButton
script.Parent.Parent.DoneButton.MouseButton1Click:Connect(function()
remoteEvent:FireServer("name2", script.Parent.Parent.GameName.Text)
remoteEvent:FireServer("description2", script.Parent.Parent.Description.Text)
game.Players.LocalPlayer.PlayerGui:WaitForChild("EditingUi").EditGui.Visible = false
EditButtonUi.Visible = true
end)
remoteEvent.OnClientEvent:Connect(function(type_, message)
if type_ == "name2" then
workspace.MainParts.Main2.SurfaceGui.GameNameLabel.Text = message
elseif type_ == "description2" then
workspace.MainParts.Main2.SurfaceGui.GameDescriptionLabel.Text = message
end
end)
--Server
local remoteEvent = game:GetService("ReplicatedStorage").EditMessage
game.Players.PlayerAdded:Connect(function(player)
script.Parent.Parent.ClickDetector.MouseClick:Connect(function(player)
player.PlayerGui:WaitForChild("EditingUi").EditGui.Visible = true
end)
end)
remoteEvent.OnServerEvent:Connect(function(player, type_, message)
remoteEvent:FireAllClients(type_, game:GetService("Chat"):FilterStringForBroadcast(message, player)) --Send our message back to all clients.
end)
Help is very needed, as I have no one else to help, thank you!
In part 2, in line 10, when you use OnClientEvent(type_, message)
When you gonna say text label.Text = message.
Then it gonna be the same together. Try to fire another text label with another remote event. You fired 2 text labels with 1 remote event so texts are gonna be the same.
if type_ == "name1" then
workspace.MainParts.Main1.SurfaceGui.GameNameLabel.Text = message
elseif type_ == "name2" then
workspace.MainParts.Main2.SurfaceGui.GameNameLabel.Text = message
end
if type_ == "description1" then
workspace.MainParts.Main1.SurfaceGui.GameDescriptionLabel.Text = message
elseif type_ == "description2" then
workspace.MainParts.Main1.SurfaceGui.GameDescriptionLabel.Text = message
end