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!
that i get to choose an option -
What is the issue? Include screenshots / videos if possible!
no gui shows up -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
look back at my script
print ed it but i cant find it
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local dialogFrame = script.Parent
dialogFrame.Visible = false
local Debounce = false
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local EmoteBar = require(ReplicatedStorage:WaitForChild("EmoteBar"))
DialogFunction = function(Dialog,Speaker)
if Debounce then
return false
end
Debounce = true
--
Dialog = Dialog or {'Dialog'}; Speaker = Speaker or 'Npc'
EmoteBar.setGuiVisibility(false)
--
dialogFrame.Visible = true
dialogFrame.Npc.Text = Speaker
for i,v in ipairs(Dialog) do
dialogFrame.Dialog.Text = v
wait(.3)
dialogFrame.Next.MouseButton1Click:Wait()
end
--End
dialogFrame.Visible = false
dialogFrame.Npc.Text = 'Npc'
dialogFrame.Dialog.Text = 'Dialog'
--
EmoteBar.setGuiVisibility(true)
Debounce = false
return true
end
repStorage = ReplicatedStorage
repStorage.DialogEvent.OnClientEvent:Connect(DialogFunction)
repStorage.DialogFunction.OnClientInvoke = DialogFunction
repStorage.DialogEvent2.Event:Connect(DialogFunction)
local ChoiceInstances = script.Parent.Frame
repStorage.DialogChoiceFunction.OnClientInvoke = function(Dialog,DialogChoices,Choices,Speaker)
print('Start..'..game.Players.LocalPlayer.Name)
script.Choice.Value = 5
Dialog = Dialog or {'Dialog'}; Speaker = Speaker or 'Npc';DialogChoices = DialogChoices or 'Choose Cancel'-----
ChoiceInstances.Choice1.Text = Choices[1] or 'Choose Cancel'
ChoiceInstances.Choice2.Text = Choices[2] or ''
ChoiceInstances.Choice3.Text = Choices[3] or ''
ChoiceInstances.Choice4.Text = Choices[4] or ''
script.Parent.Dialog.Text = DialogChoices
script.Parent.Npc.Text = Speaker
local IP = repStorage.DialogFunction2:Invoke(Dialog,Speaker)
script.Parent.Visible = true
wait(1)
local Value = script.Choice.Changed:Wait()
ChoiceInstances.Choice1.Text = 'Choice'
ChoiceInstances.Choice2.Text = 'Choice'
ChoiceInstances.Choice3.Text = 'Choice'
ChoiceInstances.Choice4.Text = 'Choice'
script.Parent.Visible = false
print('End..'..game.Players.LocalPlayer.Name)
return Value
end
ChoiceInstances.Choice1.MouseButton1Click:Connect(function()
script.Choice.Value = 1
end)
ChoiceInstances.Choice2.MouseButton1Click:Connect(function()
script.Choice.Value = 2
end)
ChoiceInstances.Choice3.MouseButton1Click:Connect(function()
script.Choice.Value = 3
end)
ChoiceInstances.Choice4.MouseButton1Click:Connect(function()
script.Choice.Value = 4
end)
ChoiceInstances.Cancel.MouseButton1Click:Connect(function()
script.Choice.Value = nil
end)
local Ready = Instance.new('BoolValue')
Ready.Name = 'DialogReady'
Ready.Parent = game.Players.LocalPlayer
call of remote
local value = game.ReplicatedStorage.DialogChoiceFunction:InvokeClient(player,{
'hello',
"i'm guard car",
'you can Enter'
},'do you want to come in?',{'yes','no'},'guard car')
if value == 1 then
Event:FireClient(player,{"i'm not ready yet"},'guard car')
else
Event:FireClient(player,{"talk again when you are ready"},'guard car')
end
feel free to ask for more
Please help