Hey there! I’m following Ponchokings story game tutorials.
Half way through development my colleague and I noticed that the dialog gui was only showing for
one player and the rest were not showing! I’m not sure if this is because of a coding error I may not have seen or if its a ROBLOX problem.
I have a remote event in ReplicatedStorage that gets called to tell clients to show a gui.
And a script in CharacterScripts which responds and shows the dialog.
--local script
local CreateDialogueEvent = game.ReplicatedStorage:WaitForChild("CreateDialogueEvent")
local player = game.Players.LocalPlayer
local function textAnimate(frame,content) -- Animates each letter
for i=1,string.len(content) do
frame.TextLabel.Text = string.sub(content,1,i)
playSound("rbxassetid://915576050")
if string.sub(content,i,i) == "!" or string.sub(content,i,i) == "." or string.sub(content,i,i) == "?" then
wait(1)
elseif string.sub(content,i,i) == "," then
wait(.5)
else
wait(.05)
end
end
end
CreateDialogueEvent.OnClientEvent:Connect(function(image_id, content)
if not player:findFirstChild("secretEnding") then
DialogueFrame.ImageLabel.Image = image_id
DialogueFrame.TextLabel.Text = ""
DialogueFrame.Visible = true
textAnimate(DialogueFrame,content)
end
end)
Heres how I call it
CreateDialogueEvent:FireAllClients(teacher_Image,"Hello Students!")
Any help is appreciated!