So a while ago, I got this script going that makes so the player presses E text will show up, my problem is, if the player clicks on 2 objects at the same time, the text will overlap itself
Script
Script.ObjectDescription = "" --String "Object Description"
Script.DisplayTimeMax = 5000 --Int "Display time"
Script.Used = "0"
Script.DisplayTime = 0
Script.DisplayEnabled = false
local font1 = Font:Load("Fonts/True Lies.ttf", 20)
function Script:Use(context)
self.Used = "1"
self.CurrentTime = Time:GetCurrent()
self.DisplayTime = Time:GetCurrent() + self.DisplayTimeMax
end
function Script:PostRender(context)
if self.Used == "1" then
App.context:SetBlendMode(Blend.Alpha)
App.context:SetFont(font1)
self.DisplayEnabled = true
if self.DisplayEnabled == true then
if self.DisplayTime > Time:GetCurrent() then
App.context:SetColor(255,255,255)
context:DrawText(self.ObjectDescription, 100, 600)
else
self.DisplayEnabled = false
self.Used = "0"
end
end
App.context:SetBlendMode(Blend.Solid)
end
end
And my problem