-
What do you want to achieve? Keep it simple and clear!
I would like for the GUI to pop up without it firing for the whole server. -
What is the issue? Include screenshots / videos if possible!
The GUI pops up for the whole server, even though it’s in a LocalScript. Here’s a video of that happening:
2022-07-03 12-41-45 -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Can’t find any solutions, however I believe it’s due to the LocalScript detecting if a part has been touched.
Here is my code:
local TextLabel = script.Parent.MainFrame.TextLabel
local Ready = true
for _, v in pairs(workspace.TutorialParts:GetChildren()) do
v.Touched:Connect(function(Hit)
if v ~= nil then
if v.Parent == workspace.TutorialParts then
local Player = game:GetService("Players"):GetPlayerFromCharacter(Hit.Parent)
if Player then
local TutorialText = v:FindFirstChild("Text")
if Ready then
Ready = false
script.Parent.MainFrame:TweenPosition(UDim2.new(0.5,0, 0.84,0), "Out", "Bounce", 1.5, true)
wait(1.5)
local function Typewrite(Object,Text)
for i = 1,#Text,1 do
Object.Text = string.sub(Text,1,i)
wait(0.05)
end
end
Typewrite(TextLabel," "..TutorialText.Value)
wait(2)
script.Parent.MainFrame:TweenPosition(UDim2.new(0.5,0, 1.42,0), "Out", "Bounce", 1.5, true)
TextLabel.Text = ""
Ready = true
end
end
end
end
end)
end