- What is the issue?
Hi,
as you can see the text is getting slower
and i don’t know how to fix that,
here is the script i made:
local me = game.Workspace.NPC.ThekyrieMVP
local player = game.Players.LocalPlayer
script.Parent.Visible = false
while wait() do
local distance = (me.HumanoidRootPart.Position - player.Character.HumanoidRootPart.Position).Magnitude
print(distance)
if distance <= 10 then
me.ClickDetector.MouseClick:Connect(function()
script.Parent.Visible = true
player.Character.Humanoid.WalkSpeed = 0
player.Character.Humanoid.JumpPower = 0
for i = 1, #text do
print("chatting")
script.Parent.Text = string.sub(text, 1, i)
wait(0.05)
end
wait(1)
script.Parent.Visible = false
player.Character.Humanoid.WalkSpeed = 16
player.Character.Humanoid.JumpPower = 50
wait(1)
script.Parent.Text = ""
end)
end
end
thx for reading