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!
A context script, like in undertale. -
What is the issue? Include screenshots / videos if possible!
It provides the Dia value as nil. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
none
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!
--server
local function Message(dia)
game.ReplicatedStorage.Type:FireAllClients(dia)
end
script.Parent.Frame.TextLabel.TextButton.MouseButton1Click:Connect(function()
Message("This is a prompt! :D")
end)
script.Parent.Parent.ProximityPrompt.Triggered:Connect(function()
Message("This is a prompt! :D")
end)
--Client
script.Parent.Visible = false
local function Write(Dia)
print(Dia)
local data = game.HttpService:JSONDecode(Dia)
print(data)
script.Parent.Visible = true
for i, let in pairs(data) do
script.Parent.Text = script.Parent.Text .. let
wait(0.1)
workspace["clickfast.wav"].PlaybackSpeed = math.random(-100, 100) / 500
workspace["clickfast.wav"]:Play()
end
wait(3)
script.Parent.Visible = false
end
game.ReplicatedStorage.Type.OnClientEvent:Connect(function(Plr, Dia)
Write(Dia)
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.