At the moment I'm programming a game where you can talk to a dealer. For that i whould Like to have a Display that shows the text: press E to speak
which always turns to the player so that it is always displayed correctly in the camera
local Trader = script.Parent.Trader.Trader.Position
local MainSystem = game.Workspace["Main System"]
local ShopID = script.Parent.ShopID.Value
wait ()
while true do
wait ()
local Childs = MainSystem.Player:GetDescendants()
for i,v in pairs (Childs) do
if v.Name == "Torso" or v.Name == "UpperTorso" then
local DistanceToTorso = (Trader - v.Position).magnitude
if DistanceToTorso < 15 then
MainSystem.Events.OpenShopEvent:FireClient(ShopID)
--Where I want to add the gui
end
end
end
end
Tutorials or the like would be very helpful :)
