Hey what’s up devforum. I’m back at it againw ith my bad scripting, lol.
Why does this do absolutely nothing except for disable the ProximityPrompt?
game.Workspace.sus.Part.ProximityPrompt.Enabled = false
game.Workspace.sus.Part.ProximityPrompt.Triggered:Connect(function()
local tweenservice = game:GetService("TweenService")
local part = script.Parent
local info = TweenInfo.new(
1,
Enum.EasingStyle.Elastic,
Enum.EasingDirection.InOut,
0,
true
)
wait(1)
local newPos = part.Position + Vector3.new(0, 5, 0)
local properties = {Position = newPos}
local tween = tweenservice:Create(part, info, properties)
tween:Play()
wait(1.7)
script.Parent.speen.Enabled = true
tween:Pause()
game.Workspace.sus.Part.ProximityPrompt.Triggered:Connect(function()
wait(4)
script.Parent.BillboardGui.MainFrame.Visible = true
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = ""
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "h"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi w"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi we"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi wel"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welc"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welco"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcom"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome "
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome t"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to "
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to p"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to pr"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to pre"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to pres"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prest"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to presti"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestig"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestige "
script.Parent.talk:Play()
wait(2.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestige 6 ("
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestige 6 (h"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestige 6 (he"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestige 6 (hel"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestige 6 (hell"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestige 6 (hell)!"
script.Parent.talk:Play()
game.Workspace.sus.Part.ProximityPrompt.Triggered:Connect(function()
wait(13)
script.Parent.BillboardGui.MainFrame.Visible = false
script.Parent.speen.Enabled = false
game.Workspace.sus.Part.ProximityPrompt.Triggered:Connect(function()
local tweenservice = game:GetService("TweenService")
local part = script.Parent
local info = TweenInfo.new(
3,
Enum.EasingStyle.Bounce,
Enum.EasingDirection.Out,
0,
true
)
wait(1)
local newPos = part.Position + Vector3.new(0, -10, 0)
local properties = {Position = newPos}
local tween = tweenservice:Create(part, info, properties)
tween:Play()
wait(5)
tween:Pause()
end)
end)
end)
end)
end)
I need help lol.
4 Likes
You’re disabling the prompt before you get to the ProximityPrompt.Triggered
, so, nothing will ever get triggered.
Also, there is a better way to make that typewriter effect, I would recommend looking into the string.sub() function.
1 Like
I see, but I don’t want the players to press the button a second time before all of the action goes on.
Try disabling it inside the triggered event.
That’s smart. There’s four of them.
4 triggered events? Why not combine it into one?
Worth a try, sure. I’ll report back in a min.
Okay, would this work?
game.Workspace.sus.Part.ProximityPrompt.Triggered:Connect(function()
game.Workspace.sus.Part.ProximityPrompt.Enabled = false
local tweenservice = game:GetService("TweenService")
local part = script.Parent
local info = TweenInfo.new(
1,
Enum.EasingStyle.Elastic,
Enum.EasingDirection.InOut,
0,
true
)
wait(1)
local newPos = part.Position + Vector3.new(0, 5, 0)
local properties = {Position = newPos}
local tween = tweenservice:Create(part, info, properties)
tween:Play()
wait(1.7)
script.Parent.speen.Enabled = true
tween:Pause()
wait(4)
script.Parent.BillboardGui.MainFrame.Visible = true
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = ""
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "h"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi w"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi we"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi wel"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welc"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welco"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcom"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome "
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome t"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to "
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to p"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to pr"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to pre"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to pres"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prest"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to presti"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestig"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestige "
script.Parent.talk:Play()
wait(2.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestige 6 ("
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestige 6 (h"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestige 6 (he"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestige 6 (hel"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestige 6 (hell"
script.Parent.talk:Play()
wait(0.05)
script.Parent.BillboardGui.MainFrame.Dialogue1.Text = "hi welcome to prestige 6 (hell)!"
script.Parent.talk:Play()
wait(13)
script.Parent.BillboardGui.MainFrame.Visible = false
script.Parent.speen.Enabled = false
local tweenservice2 = game:GetService("TweenService")
local part2 = script.Parent
local info2 = TweenInfo.new(
3,
Enum.EasingStyle.Bounce,
Enum.EasingDirection.Out,
0,
true
)
wait(1)
local newPos2 = part.Position + Vector3.new(0, -10, 0)
local properties2 = {Position = newPos2}
local tween2 = tweenservice:Create(part2, info2, properties2)
tween2:Play()
wait(5)
tween2:Pause()
end)
1 Like
It looks like it. Let me know how it works for you.
Don’t forget to re-enable the prompt at the bottom, although I’m not sure exactly what you’re doing so I don’t know if you want that.
Yeah, thank you, it worked!
1 Like
I also highly suggest you use a typewriting effect like this:
local message = "hi welcome to prestige 6 (hell)!"
local TextLabel = script.Parent.BillboardGui.MainFrame.Dialogue1
for i = 0, #message do
TextLabel.Text = string.sub(message, 1, i)
end
1 Like
Sorry for the late reply. Blue error: 1. For loop starts at 0, but arrays start at 1
B.T.W, How do i make the Talk sound play everytime he speaks a letter? Thank you
1 Like
You can just call the :Play() method on a sound inside the for loop.
What do you mean by this? You can edit the start and end values of the for loop.