I want to add a e to open when you get near a part but right now i cant seem to add it with it working. i have tried many different ways and none works.
Local script is inside starterPlayer - starterPlayerScripts
1 messages · Page 1 of 1 (latest)
I want to add a e to open when you get near a part but right now i cant seem to add it with it working. i have tried many different ways and none works.
Local script is inside starterPlayer - starterPlayerScripts
@keen moss Can you explain what you mean by ''get a e to open when you get near it'
** You are now Level 6! **
so lets say, you are 10 or less studs close to a part, if you then press E your camera shift over to a designated camera and enables some ui just like what happens in the script when you click a gui.
oh thats simple
you'd js do
local UserInputService = game:GetService("UserInputService")
local PartToBeNear = workspace.Part
UserInputService.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.E then
if (game.Players.LocalPlayer.Character.HumanoidRootPart.Position - PartToBeNear.Position).Magnitude <= 10 then
--open the shop ect
end
end
end)
@keen moss
Proximity prompt