I need help with my pad. I want to have a pad that opens a shop gui. I am using Touched and TouchEnded. Idk if it is the most efficent way to make something like this so thats why im asking for better, more efficient ways to do so.
Local RunService = game:GetService("RunService")
RunService.RenderStepped:Connect(function()
if (Character.HumanoidRootPart.Position - ShopPart.Position).Magnitude <= 4 then
--Open
else
--Close
end
end)
I agree with this, TouchEnded legit never works the way you want it. Another option is Region3 (sorry if spellt wrong) but Magnitude is more simple enough for starters.
local player = game:GetService("Players").LocalPlayer or game.Players.PlayerAdded:Wait()
local Character = player.Character or player.CharacterAdded:Wait()