Whenever someone types the key “r”, in the chat or not, it will always result in the code firing. Help.
UIS.InputBegan:Connect(function(input, gameProcessedEvent)
if input.KeyCode == Enum.KeyCode.R then
if stand == true then
rep.Events.InputEvent:FireServer("Ragdoll")
stand = false
elseif stand == false then
rep.Events.InputEvent:FireServer("Stand")
stand = true
end
end
if input.KeyCode == Enum.KeyCode.E then
if stand == false then return end
if mouse.Target then
if mouse.Target.Anchored == false then
selectedPart = mouse.Target
mouse.TargetFilter = selectedPart
local bodyPosition = Instance.new("BodyPosition")
bodyPosition.Parent = selectedPart
rep.Events.OwnershipEvent:FireServer(selectedPart, "Add")
end
end
end
end)