You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I’m trying to reroute it so when you click on a Part in the lobby, it brings up the Feedback Gui. -
What is the issue? Include screenshots/videos if possible!
It’s not cloning the Gui to the players StarterGui when you click on the Part which then fires the ClickDetector to cloning to StarterGui. - What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried to recode the LocalScript that clones the Gui for the local player firing so it clones to their StarterGui, but nothing seems to be working, unless it’s just the way I’m coding it. No errors/warnings show up in the developer console either.
The LocalScript inside the part that clones the gui upon clicking it:
local open = false
local feedbackMain = script.Parent.FeedbackGui.FeedbackMain
local CD = script.Parent.ClickDetector
script.Parent.ClickDetector.MouseClick:Connect(function()
game.ReplicatedStorage.Remotes.FeedBack:FireServer()
script.Parent.FeedbackGui:Clone(game.StarterGui)
local frame = game.StarterGui.FeedbackGui
if frame.Visible == false then
frame.Visible = true
end
end)
The Script inside the FeedbackGui:
--SETUP
local maxCharacters = 500
--Variables
local player = game.Players.LocalPlayer
local open = false
--UI
local feedbackMain = script.Parent.FeedbackMain
--Script
feedbackMain.CharactersLeft.Text = maxCharacters - #feedbackMain.InputBox.Input.Text
feedbackMain.InputBox.Input.Changed:Connect(function()
feedbackMain.CharactersLeft.Text = maxCharacters - #feedbackMain.InputBox.Input.Text
if maxCharacters - #feedbackMain.InputBox.Input.Text < 0 then
feedbackMain.CharactersLeft.TextColor3 = Color3.fromRGB(255,50,50)
feedbackMain.SendButton.Style = Enum.ButtonStyle.RobloxRoundButton
else
feedbackMain.CharactersLeft.TextColor3 = Color3.fromRGB(255,255,255)
feedbackMain.SendButton.Style = Enum.ButtonStyle.RobloxRoundDefaultButton
end
end)
local db = false
feedbackMain.SendButton.MouseButton1Click:Connect(function()
if not db and maxCharacters - #feedbackMain.InputBox.Input.Text >= 0 then
db = true
local msg = feedbackMain.InputBox.Input.Text
feedbackMain.InputBox.Input.Text = "Sending Message..."
local response = game.ReplicatedStorage.FilteringFunction:InvokeServer(msg)
feedbackMain.InputBox.Input.Text = response
wait(5)
if feedbackMain.InputBox.Input.Text == response then
feedbackMain.InputBox.Input.Text = "Type feedback/bug report here"
end
db = false
end
end)