I’ve currently been working on fixing my GUI’s and a dialog system to notice a slight problem.
Whenever a player touches a “Dialog Brick”, it should cause a Dialog gui to only appear on their screen and nobody else. The Dialog Bricks have a module with their respected dialogs and modules for setting the look and appearence.
The GUI for some reason appears on everybody’s screen. There are no RemoteEvents/RemoteFunctions whatsoever. I’m also doing it on a Local Script which I presume should work without any problems and should only tween on the client side?
The script is located in the GUI itself:
for _,Dialogs in pairs(CS:GetTagged("DialogPoints")) do
Dialogs.Touched:Connect(function(Part)
if Part.Parent:FindFirstChild("Humanoid") then
if not DEB then
DEB = true
local HRP = Part.Parent:FindFirstChild("HumanoidRootPart")
local TSEQ = require(Dialogs.TextSequence)
if Dialogs:FindFirstChild("IsATutorial") then
HRP.CFrame = Dialogs.CFrame
HRP.Velocity = Vector3.new(0,0,0)
Part.Parent:FindFirstChild("Humanoid").WalkSpeed = 0
end
ShowFrame()
Dialogs:Destroy()
StartDialog(TSEQ)
HideFrame()
Part.Parent:FindFirstChild("Humanoid").WalkSpeed = 16
DEB = false
HRP.Anchored = false
end
end
end)
end
TSEQ is the module from the Dialog parts, it contains all the dialogs needed to be played.
local function StartDialog(TableMsg)
for i = 1, #TableMsg, 1 do
local TextObj = TextModule:New(TF, TableMsg[i].Text, {Font = "SourceSansLight"})
AssignCubeType(TableMsg[i].CubeType)
AssignWantedExpression(TableMsg[i].Expression)
TextObj:Animate(true)
CBTweenIn:Play()
wait(CBTweenIn.TweenInfo.Time)
HPressed = false
repeat wait() until HPressed
CBTweenOut:Play()
wait(CBTweenOut.TweenInfo.Time)
TextObj:Hide()
end
end
The StartDialog is where it starts the dialog and changes the dialog messages.
Any reason to why this is happening?