I’m making a game but my textlabel is clipping when i put into a string, for some reason it only does that when i put strings, but if i change to normal, it just be normal again!!!
so, can anyone help me?
Code:
local TweenService = game:GetService("TweenService") --gets tweenService
local tweenInstance = script.Parent --the gui you want to move/resize
local Event = game.ReplicatedStorage:WaitForChild("DialogueEvent")
local tweenInfo = TweenInfo.new(0.4,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0) -- creates the tweens info (if you want it to repeat, change the 0 to how many times it should repeat.)
local tween = TweenService:Create(tweenInstance, tweenInfo, {Position = UDim2.new(0.513, 0,0.783, 0)}) --creates the tween
local tween2 = TweenService:Create(tweenInstance, tweenInfo, {Position = UDim2.new(0.513, 0, 1, 0)}) --creates the tween
local tween3 = TweenService:Create(
script.Parent.InitialPrompt,
TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut),
{MaxVisibleGraphemes = string.len(script.Parent.InitialPrompt.Text)})
tweenInstance.Position = UDim2.new(0.513, 0, 1, 0)
Event.OnClientEvent:Connect(function(Message)
script.Parent.Parent.Enabled = true
tween:Play() --plays the tween
script.Parent.InitialPrompt.MaxVisibleGraphemes = 0
script.Parent.InitialPrompt.Text = Message
task.wait(1)
tween3:Play()
tween3.Completed:Wait()
task.wait(3)
tween2:Play()
end)
well, your didn’t solved it, but i already solved it. i just changed a line of code of the function.
here’s the updated code:
--place this script INSIDE the gui instance you want to move/resize
local TweenService = game:GetService("TweenService") --gets tweenService
local tweenInstance = script.Parent --the gui you want to move/resize
local Event = game.ReplicatedStorage:WaitForChild("DialogueEvent")
local DB = false
local tweenInfo = TweenInfo.new(0.4,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0) -- creates the tweens info (if you want it to repeat, change the 0 to how many times it should repeat.)
local tween = TweenService:Create(tweenInstance, tweenInfo, {Position = UDim2.new(0.513, 0,0.783, 0)}) --creates the tween
local tween2 = TweenService:Create(tweenInstance, tweenInfo, {Position = UDim2.new(0.513, 0, 1, 0)}) --creates the tween
tweenInstance.Position = UDim2.new(0.513, 0, 1, 0)
Event.OnClientEvent:Connect(function(Message)
if DB == false then
local tween3 = TweenService:Create(
script.Parent.InitialPrompt,
TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut),
{MaxVisibleGraphemes = string.len(Message)})
DB = true
script.Parent.Parent.Enabled = true
tween:Play() --plays the tween
script.Parent.InitialPrompt.Text = Message
print(Message)
task.wait(1)
tween3:Play()
tween3.Completed:Wait()
task.wait(3)
tween2:Play()
DB = false
end
end)
--thanks for using My Tween Tool, leave a comment under this plugin if you have any questions or wanna report a bug. :)