A while back, I thought of putting a ProximityPrompt inside the character and not using UserInputService or ContextActionService which is client, ProximityPrompt only use the server.
Example
Let say I have a Shift to Run LocalScript(client).
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local LocalPlayer = Players.LocalPlayer or Players.PlayerAdded:Wait()
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local Humanoid = Character:FindFirstChildWhichIsA("Humanoid")
UserInputService.InputBegan:Connect(function(gamepross,Object)
if Object.KeyCode == Enum.KeyCode.LeftShift then
Humanoid.WalkSpeed = 60
end
end)
UserInputService.InputEnded:Connect(function(gamepross,Object)
if Object.KeyCode == Enum.KeyCode.LeftShift then
Humanoid.WalkSpeed = 30
end
end)
This is most easy for exploiters to use, they can just edit the walkspeed, I could check if walkspeed was changed but, they can always delete anything that on client, let say I made a server script where I would use Humanoid.Running Event, I can check if there running passed the walkspeed and i could kick them, but whenever player press shift it would detect, and then player would kick. I could send a remoteevent by cilent to server, but exploiter are able to use fire remoteevents.
Soo this when I realize that ProximityPrompt works with Server and not on the client. which is where I’m able to make a pro gamer move. i could copy a ProximityPrompt and place it on the Torso, and then i could use PromptButtonHoldBegan or PromptButtonHoldEnded to detect when player press key, changed the walkspeed, and be able to check running event without having to use any remoteevents.
But my main question is, Would this be a good idea, and Would this lag Server due to players pressing KeyCodes.